
// -*-c++-*-
//-------------------------------------------------------------------------
//   Copyright 2002-2023 National Technology & Engineering Solutions of
//   Sandia, LLC (NTESS).  Under the terms of Contract DE-NA0003525 with
//   NTESS, the U.S. Government retains certain rights in this software.
//
//   This file is part of the Xyce(TM) Parallel Electrical Simulator.
//
//   Xyce(TM) is free software: you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation, either version 3 of the License, or
//   (at your option) any later version.
//
//   Xyce(TM) is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with Xyce(TM).
//   If not, see <http://www.gnu.org/licenses/>.
//-------------------------------------------------------------------------

//-----------------------------------------------------------------------------
//
// Purpose        :
//
// Special Notes  : Generated from verilog file BSIM6.1.1.va with ADMS
//                  interface for Xyce 7.7.0
//                  DO NOT EDIT THIS FILE DIRECTLY!  It may be overwritten!
//
// Creator        : admsXml-2.3.7
//
// Creation Date  : Mon, 09 Jan 2023 12:53:25
//
//-----------------------------------------------------------------------------
#ifndef Xyce_N_DEV_ADMSbsim6_h
#define Xyce_N_DEV_ADMSbsim6_h


#include <N_DEV_Configuration.h>
#include <N_DEV_Const.h>
#include <N_DEV_DeviceBlock.h>
#include <N_DEV_DeviceInstance.h>
#include <N_DEV_DeviceModel.h>
#include <N_DEV_MOSFET1.h>


// Xyce_config.h contains a VERSION macro from autoconf, and some
// Verilog-A models like to define a variable of that name.  This can be
// a serious problem, and we don't need the VERSION macro.  Get rid of it.
// This must happen *after* all the includes of Xyce headers, each of which
// includes Xyce_config.h.  The implementation file must do this all again
// because it includes more Xyce headers *after* including this one.
#ifdef VERSION
#undef VERSION
#endif

namespace Xyce {
namespace Device {
namespace ADMSbsim6 {

class Model;
class Instance;
class InstanceSensitivity;

#ifdef Xyce_ADMS_SENSITIVITIES
//-----------------------------------------------------------------------------
// Class         : InstanceSensitivity
//
// Purpose       : This class is a functor for sensitivity
//
// Special Notes :
// Creator       :
// Creation Date :
//-----------------------------------------------------------------------------
class InstanceSensitivity : public baseSensitivity
{
public:
InstanceSensitivity() :
baseSensitivity() {};

virtual ~InstanceSensitivity() {};

virtual void operator()(
const ParameterBase &entity,
const std::string &param,
std::vector<double> & dfdp,
std::vector<double> & dqdp,
std::vector<double> & dbdp,
std::vector<int> & Findices,
std::vector<int> & Qindices,
std::vector<int> & Bindices
) const ;
};

static InstanceSensitivity instSens;


//-----------------------------------------------------------------------------
// Class         : ModelSensitivity
//
// Purpose       : This class is a functor for sensitivity
//
// Special Notes :
// Creator       :
// Creation Date :
//-----------------------------------------------------------------------------
class ModelSensitivity : public baseSensitivity
{
public:
ModelSensitivity() :
baseSensitivity() {};

virtual ~ModelSensitivity() {};

virtual void operator()(
const ParameterBase &entity,
const std::string &param,
std::vector<double> & dfdp,
std::vector<double> & dqdp,
std::vector<double> & dbdp,
std::vector<int> & Findices,
std::vector<int> & Qindices,
std::vector<int> & Bindices
) const ;
};

static ModelSensitivity modSens;
#endif // Xyce_ADMS_SENSITIVITIES

// general purpose free functions
// thermal voltage at kelvin temperature temp)
static inline double adms_vt(const double temp) {return(CONSTKoverQ*temp);};


#ifdef Xyce_ADMS_SENSITIVITIES
//-----------------------------------------------------------------------------
// "structs" to hold instance and model param/variable copies
//-----------------------------------------------------------------------------
class instanceSensStruct
{
public:
// instance parameters
// reals
double instancePar_L;
double d_instancePar_L_dX;
bool instancePar_given_L;
double instancePar_W;
double d_instancePar_W_dX;
bool instancePar_given_W;
double instancePar_NRS;
double d_instancePar_NRS_dX;
bool instancePar_given_NRS;
double instancePar_NRD;
double d_instancePar_NRD_dX;
bool instancePar_given_NRD;
double instancePar_VFBSDOFF;
double d_instancePar_VFBSDOFF_dX;
bool instancePar_given_VFBSDOFF;
double instancePar_XGW;
double d_instancePar_XGW_dX;
bool instancePar_given_XGW;
double instancePar_RBPB;
double d_instancePar_RBPB_dX;
bool instancePar_given_RBPB;
double instancePar_RBPD;
double d_instancePar_RBPD_dX;
bool instancePar_given_RBPD;
double instancePar_RBPS;
double d_instancePar_RBPS_dX;
bool instancePar_given_RBPS;
double instancePar_RBDB;
double d_instancePar_RBDB_dX;
bool instancePar_given_RBDB;
double instancePar_RBSB;
double d_instancePar_RBSB_dX;
bool instancePar_given_RBSB;
double instancePar_SA;
double d_instancePar_SA_dX;
bool instancePar_given_SA;
double instancePar_SB;
double d_instancePar_SB_dX;
bool instancePar_given_SB;
double instancePar_SD;
double d_instancePar_SD_dX;
bool instancePar_given_SD;
double instancePar_AS;
double d_instancePar_AS_dX;
bool instancePar_given_AS;
double instancePar_AD;
double d_instancePar_AD_dX;
bool instancePar_given_AD;
double instancePar_PS;
double d_instancePar_PS_dX;
bool instancePar_given_PS;
double instancePar_PD;
double d_instancePar_PD_dX;
bool instancePar_given_PD;
double instancePar_m;
double d_instancePar_m_dX;
bool instancePar_given_m;
// non-reals(including hidden)
int instancePar_NF;
bool instancePar_given_NF;
int instancePar_MINZ;
bool instancePar_given_MINZ;
int instancePar_NGCON;
bool instancePar_given_NGCON;
int instancePar_RGATEMOD;
bool instancePar_given_RGATEMOD;
int instancePar_RBODYMOD;
bool instancePar_given_RBODYMOD;
int instancePar_GEOMOD;
bool instancePar_given_GEOMOD;
int instancePar_RGEOMOD;
bool instancePar_given_RGEOMOD;
int instancePar_SCA;
bool instancePar_given_SCA;
int instancePar_SCB;
bool instancePar_given_SCB;
int instancePar_SCC;
bool instancePar_given_SCC;
int instancePar_SC;
bool instancePar_given_SC;
// instance variables
// reals
double instanceVar_T0;
double d_instanceVar_T0_dX;
double instanceVar_T1;
double d_instanceVar_T1_dX;
double instanceVar_T2;
double d_instanceVar_T2_dX;
double instanceVar_epssi;
double d_instanceVar_epssi_dX;
double instanceVar_epsox;
double d_instanceVar_epsox_dX;
double instanceVar_Weff;
double d_instanceVar_Weff_dX;
double instanceVar_Leff;
double d_instanceVar_Leff_dX;
double instanceVar_Wact;
double d_instanceVar_Wact_dX;
double instanceVar_Lact;
double d_instanceVar_Lact_dX;
double instanceVar_Weffcj;
double d_instanceVar_Weffcj_dX;
double instanceVar_Cox;
double d_instanceVar_Cox_dX;
double instanceVar_epsratio;
double d_instanceVar_epsratio_dX;
double instanceVar_Lnew;
double d_instanceVar_Lnew_dX;
double instanceVar_L_mult;
double d_instanceVar_L_mult_dX;
double instanceVar_Wnew;
double d_instanceVar_Wnew_dX;
double instanceVar_DVTP0_i;
double d_instanceVar_DVTP0_i_dX;
double instanceVar_DVTP1_i;
double d_instanceVar_DVTP1_i_dX;
double instanceVar_DVTP2_i;
double d_instanceVar_DVTP2_i_dX;
double instanceVar_DVTP3_i;
double d_instanceVar_DVTP3_i_dX;
double instanceVar_DVTP4_i;
double d_instanceVar_DVTP4_i_dX;
double instanceVar_DVTP5_i;
double d_instanceVar_DVTP5_i_dX;
double instanceVar_A1_i;
double d_instanceVar_A1_i_dX;
double instanceVar_A11_i;
double d_instanceVar_A11_i_dX;
double instanceVar_A2_i;
double d_instanceVar_A2_i_dX;
double instanceVar_A21_i;
double d_instanceVar_A21_i_dX;
double instanceVar_PSAT_i;
double d_instanceVar_PSAT_i_dX;
double instanceVar_PSATR_i;
double d_instanceVar_PSATR_i_dX;
double instanceVar_BSIM6TOXP;
double d_instanceVar_BSIM6TOXP_dX;
double instanceVar_DMCGeff;
double d_instanceVar_DMCGeff_dX;
double instanceVar_DMDGeff;
double d_instanceVar_DMDGeff_dX;
double instanceVar_DMCIeff;
double d_instanceVar_DMCIeff_dX;
double instanceVar_RSourceGeo;
double d_instanceVar_RSourceGeo_dX;
double instanceVar_RDrainGeo;
double d_instanceVar_RDrainGeo_dX;
double instanceVar_Grgeltd;
double d_instanceVar_Grgeltd_dX;
double instanceVar_Grbsb;
double d_instanceVar_Grbsb_dX;
double instanceVar_Grbdb;
double d_instanceVar_Grbdb_dX;
double instanceVar_Grbpb;
double d_instanceVar_Grbpb_dX;
double instanceVar_Grbps;
double d_instanceVar_Grbps_dX;
double instanceVar_Grbpd;
double d_instanceVar_Grbpd_dX;
double instanceVar_Aechvb;
double d_instanceVar_Aechvb_dX;
double instanceVar_Bechvb;
double d_instanceVar_Bechvb_dX;
double instanceVar_AechvbEdge;
double d_instanceVar_AechvbEdge_dX;
double instanceVar_BechvbEdge;
double d_instanceVar_BechvbEdge_dX;
double instanceVar_ToxRatio;
double d_instanceVar_ToxRatio_dX;
double instanceVar_U0R_t;
double d_instanceVar_U0R_t_dX;
double instanceVar_UAR_t;
double d_instanceVar_UAR_t_dX;
double instanceVar_UCR_t;
double d_instanceVar_UCR_t_dX;
double instanceVar_UDR_t;
double d_instanceVar_UDR_t_dX;
double instanceVar_UCSR_t;
double d_instanceVar_UCSR_t_dX;
double instanceVar_VSATR_t;
double d_instanceVar_VSATR_t_dX;
double instanceVar_PTWGR_t;
double d_instanceVar_PTWGR_t_dX;
double instanceVar_ETA0R_t;
double d_instanceVar_ETA0R_t_dX;
double instanceVar_PSATB_i;
double d_instanceVar_PSATB_i_dX;
double instanceVar_KT1_i;
double d_instanceVar_KT1_i_dX;
double instanceVar_KT2_i;
double d_instanceVar_KT2_i_dX;
double instanceVar_NGATE_i;
double d_instanceVar_NGATE_i_dX;
double instanceVar_NSD_i;
double d_instanceVar_NSD_i_dX;
double instanceVar_NDEP_i;
double d_instanceVar_NDEP_i_dX;
double instanceVar_VFB_i;
double d_instanceVar_VFB_i_dX;
double instanceVar_CIT_i;
double d_instanceVar_CIT_i_dX;
double instanceVar_CDSCD_i;
double d_instanceVar_CDSCD_i_dX;
double instanceVar_CDSCDR_i;
double d_instanceVar_CDSCDR_i_dX;
double instanceVar_CDSCB_i;
double d_instanceVar_CDSCB_i_dX;
double instanceVar_NFACTOR_i;
double d_instanceVar_NFACTOR_i_dX;
double instanceVar_PHIN_i;
double d_instanceVar_PHIN_i_dX;
double instanceVar_ETA0_i;
double d_instanceVar_ETA0_i_dX;
double instanceVar_ETA0R_i;
double d_instanceVar_ETA0R_i_dX;
double instanceVar_ETAB_i;
double d_instanceVar_ETAB_i_dX;
double instanceVar_K2_i;
double d_instanceVar_K2_i_dX;
double instanceVar_K1_i;
double d_instanceVar_K1_i_dX;
double instanceVar_DELTA_i;
double d_instanceVar_DELTA_i_dX;
double instanceVar_U0_i;
double d_instanceVar_U0_i_dX;
double instanceVar_U0R_i;
double d_instanceVar_U0R_i_dX;
double instanceVar_VSAT_i;
double d_instanceVar_VSAT_i_dX;
double instanceVar_VSATR_i;
double d_instanceVar_VSATR_i_dX;
double instanceVar_VSATCV_i;
double d_instanceVar_VSATCV_i_dX;
double instanceVar_UA_i;
double d_instanceVar_UA_i_dX;
double instanceVar_UAR_i;
double d_instanceVar_UAR_i_dX;
double instanceVar_EU_i;
double d_instanceVar_EU_i_dX;
double instanceVar_UD_i;
double d_instanceVar_UD_i_dX;
double instanceVar_UDR_i;
double d_instanceVar_UDR_i_dX;
double instanceVar_UD_a;
double d_instanceVar_UD_a_dX;
double instanceVar_UCS_i;
double d_instanceVar_UCS_i_dX;
double instanceVar_UCSR_i;
double d_instanceVar_UCSR_i_dX;
double instanceVar_UC_i;
double d_instanceVar_UC_i_dX;
double instanceVar_UCR_i;
double d_instanceVar_UCR_i_dX;
double instanceVar_PDIBLC_i;
double d_instanceVar_PDIBLC_i_dX;
double instanceVar_PDIBLCR_i;
double d_instanceVar_PDIBLCR_i_dX;
double instanceVar_PDIBLCB_i;
double d_instanceVar_PDIBLCB_i_dX;
double instanceVar_PSCBE1_i;
double d_instanceVar_PSCBE1_i_dX;
double instanceVar_PSCBE2_i;
double d_instanceVar_PSCBE2_i_dX;
double instanceVar_PDITS_i;
double d_instanceVar_PDITS_i_dX;
double instanceVar_PDITSD_i;
double d_instanceVar_PDITSD_i_dX;
double instanceVar_FPROUT_i;
double d_instanceVar_FPROUT_i_dX;
double instanceVar_PRWG_i;
double d_instanceVar_PRWG_i_dX;
double instanceVar_WR_i;
double d_instanceVar_WR_i_dX;
double instanceVar_RDWMIN_i;
double d_instanceVar_RDWMIN_i_dX;
double instanceVar_RSWMIN_i;
double d_instanceVar_RSWMIN_i_dX;
double instanceVar_RDW_i;
double d_instanceVar_RDW_i_dX;
double instanceVar_RSW_i;
double d_instanceVar_RSW_i_dX;
double instanceVar_RDSW_i;
double d_instanceVar_RDSW_i_dX;
double instanceVar_RDSWMIN_i;
double d_instanceVar_RDSWMIN_i_dX;
double instanceVar_PTWG_i;
double d_instanceVar_PTWG_i_dX;
double instanceVar_PTWGR_i;
double d_instanceVar_PTWGR_i_dX;
double instanceVar_PVAG_i;
double d_instanceVar_PVAG_i_dX;
double instanceVar_XJ_i;
double d_instanceVar_XJ_i_dX;
double instanceVar_PCLM_i;
double d_instanceVar_PCLM_i_dX;
double instanceVar_PCLMR_i;
double d_instanceVar_PCLMR_i_dX;
double instanceVar_PCLMCV_i;
double d_instanceVar_PCLMCV_i_dX;
double instanceVar_PRWB_i;
double d_instanceVar_PRWB_i_dX;
double instanceVar_CF_i;
double d_instanceVar_CF_i_dX;
double instanceVar_CGSL_i;
double d_instanceVar_CGSL_i_dX;
double instanceVar_CGDL_i;
double d_instanceVar_CGDL_i_dX;
double instanceVar_CKAPPAS_i;
double d_instanceVar_CKAPPAS_i_dX;
double instanceVar_CKAPPAD_i;
double d_instanceVar_CKAPPAD_i_dX;
double instanceVar_VFBCV_i;
double d_instanceVar_VFBCV_i_dX;
double instanceVar_NDEPCV_i;
double d_instanceVar_NDEPCV_i_dX;
double instanceVar_ALPHA0_i;
double d_instanceVar_ALPHA0_i_dX;
double instanceVar_BETA0_i;
double d_instanceVar_BETA0_i_dX;
double instanceVar_AGIDL_i;
double d_instanceVar_AGIDL_i_dX;
double instanceVar_BGIDL_i;
double d_instanceVar_BGIDL_i_dX;
double instanceVar_CGIDL_i;
double d_instanceVar_CGIDL_i_dX;
double instanceVar_EGIDL_i;
double d_instanceVar_EGIDL_i_dX;
double instanceVar_AGISL_i;
double d_instanceVar_AGISL_i_dX;
double instanceVar_BGISL_i;
double d_instanceVar_BGISL_i_dX;
double instanceVar_CGISL_i;
double d_instanceVar_CGISL_i_dX;
double instanceVar_EGISL_i;
double d_instanceVar_EGISL_i_dX;
double instanceVar_UTE_i;
double d_instanceVar_UTE_i_dX;
double instanceVar_UA1_i;
double d_instanceVar_UA1_i_dX;
double instanceVar_UC1_i;
double d_instanceVar_UC1_i_dX;
double instanceVar_UD1_i;
double d_instanceVar_UD1_i_dX;
double instanceVar_UCSTE_i;
double d_instanceVar_UCSTE_i_dX;
double instanceVar_PRT_i;
double d_instanceVar_PRT_i_dX;
double instanceVar_AT_i;
double d_instanceVar_AT_i_dX;
double instanceVar_PTWGT_i;
double d_instanceVar_PTWGT_i_dX;
double instanceVar_IIT_i;
double d_instanceVar_IIT_i_dX;
double instanceVar_TGIDL_i;
double d_instanceVar_TGIDL_i_dX;
double instanceVar_KVTH0WE_i;
double d_instanceVar_KVTH0WE_i_dX;
double instanceVar_K2WE_i;
double d_instanceVar_K2WE_i_dX;
double instanceVar_KU0WE_i;
double d_instanceVar_KU0WE_i_dX;
double instanceVar_AIGBINV_i;
double d_instanceVar_AIGBINV_i_dX;
double instanceVar_BIGBINV_i;
double d_instanceVar_BIGBINV_i_dX;
double instanceVar_CIGBINV_i;
double d_instanceVar_CIGBINV_i_dX;
double instanceVar_EIGBINV_i;
double d_instanceVar_EIGBINV_i_dX;
double instanceVar_NIGBINV_i;
double d_instanceVar_NIGBINV_i_dX;
double instanceVar_AIGBACC_i;
double d_instanceVar_AIGBACC_i_dX;
double instanceVar_BIGBACC_i;
double d_instanceVar_BIGBACC_i_dX;
double instanceVar_CIGBACC_i;
double d_instanceVar_CIGBACC_i_dX;
double instanceVar_NIGBACC_i;
double d_instanceVar_NIGBACC_i_dX;
double instanceVar_AIGC_i;
double d_instanceVar_AIGC_i_dX;
double instanceVar_BIGC_i;
double d_instanceVar_BIGC_i_dX;
double instanceVar_CIGC_i;
double d_instanceVar_CIGC_i_dX;
double instanceVar_AIGS_i;
double d_instanceVar_AIGS_i_dX;
double instanceVar_BIGS_i;
double d_instanceVar_BIGS_i_dX;
double instanceVar_CIGS_i;
double d_instanceVar_CIGS_i_dX;
double instanceVar_AIGD_i;
double d_instanceVar_AIGD_i_dX;
double instanceVar_BIGD_i;
double d_instanceVar_BIGD_i_dX;
double instanceVar_CIGD_i;
double d_instanceVar_CIGD_i_dX;
double instanceVar_PIGCD_i;
double d_instanceVar_PIGCD_i_dX;
double instanceVar_DLCIG_i;
double d_instanceVar_DLCIG_i_dX;
double instanceVar_DLCIGD_i;
double d_instanceVar_DLCIGD_i_dX;
double instanceVar_IGT_i;
double d_instanceVar_IGT_i_dX;
double instanceVar_nuIntD;
double d_instanceVar_nuIntD_dX;
double instanceVar_nuEndD;
double instanceVar_nuIntS;
double d_instanceVar_nuIntS_dX;
double instanceVar_nuEndS;
double instanceVar_gth;
double d_instanceVar_gth_dX;
double instanceVar_cth;
double d_instanceVar_cth_dX;
double instanceVar_QSI;
double d_instanceVar_QSI_dX;
double instanceVar_QDI;
double d_instanceVar_QDI_dX;
double instanceVar_QGI;
double d_instanceVar_QGI_dX;
double instanceVar_ISUB;
double d_instanceVar_ISUB_dX;
double instanceVar_IGIDL;
double d_instanceVar_IGIDL_dX;
double instanceVar_IGISL;
double d_instanceVar_IGISL_dX;
double instanceVar_IGS;
double d_instanceVar_IGS_dX;
double instanceVar_IGD;
double d_instanceVar_IGD_dX;
double instanceVar_IGCS;
double d_instanceVar_IGCS_dX;
double instanceVar_IGCD;
double d_instanceVar_IGCD_dX;
double instanceVar_IGB;
double d_instanceVar_IGB_dX;
// non-reals
int instanceVar_devsign;
};

class modelSensStruct
{
public:
// model parameters
// reals
double modelPar_L;
double d_modelPar_L_dX;
bool modelPar_given_L;
double modelPar_VFBSDOFF;
double d_modelPar_VFBSDOFF_dX;
bool modelPar_given_VFBSDOFF;
double modelPar_XGW;
double d_modelPar_XGW_dX;
bool modelPar_given_XGW;
double modelPar_RBPB;
double d_modelPar_RBPB_dX;
bool modelPar_given_RBPB;
double modelPar_RBPD;
double d_modelPar_RBPD_dX;
bool modelPar_given_RBPD;
double modelPar_RBPS;
double d_modelPar_RBPS_dX;
bool modelPar_given_RBPS;
double modelPar_RBDB;
double d_modelPar_RBDB_dX;
bool modelPar_given_RBDB;
double modelPar_RBSB;
double d_modelPar_RBSB_dX;
bool modelPar_given_RBSB;
double modelPar_SA;
double d_modelPar_SA_dX;
bool modelPar_given_SA;
double modelPar_SB;
double d_modelPar_SB_dX;
bool modelPar_given_SB;
double modelPar_SD;
double d_modelPar_SD_dX;
bool modelPar_given_SD;
double modelPar_LLONG;
double d_modelPar_LLONG_dX;
bool modelPar_given_LLONG;
double modelPar_LMLT;
double d_modelPar_LMLT_dX;
bool modelPar_given_LMLT;
double modelPar_WMLT;
double d_modelPar_WMLT_dX;
bool modelPar_given_WMLT;
double modelPar_XL;
double d_modelPar_XL_dX;
bool modelPar_given_XL;
double modelPar_WWIDE;
double d_modelPar_WWIDE_dX;
bool modelPar_given_WWIDE;
double modelPar_XW;
double d_modelPar_XW_dX;
bool modelPar_given_XW;
double modelPar_LINT;
double d_modelPar_LINT_dX;
bool modelPar_given_LINT;
double modelPar_LL;
double d_modelPar_LL_dX;
bool modelPar_given_LL;
double modelPar_LW;
double d_modelPar_LW_dX;
bool modelPar_given_LW;
double modelPar_LWL;
double d_modelPar_LWL_dX;
bool modelPar_given_LWL;
double modelPar_LLN;
double d_modelPar_LLN_dX;
bool modelPar_given_LLN;
double modelPar_LWN;
double d_modelPar_LWN_dX;
bool modelPar_given_LWN;
double modelPar_WINT;
double d_modelPar_WINT_dX;
bool modelPar_given_WINT;
double modelPar_WL;
double d_modelPar_WL_dX;
bool modelPar_given_WL;
double modelPar_WW;
double d_modelPar_WW_dX;
bool modelPar_given_WW;
double modelPar_WWL;
double d_modelPar_WWL_dX;
bool modelPar_given_WWL;
double modelPar_WLN;
double d_modelPar_WLN_dX;
bool modelPar_given_WLN;
double modelPar_WWN;
double d_modelPar_WWN_dX;
bool modelPar_given_WWN;
double modelPar_DLC;
double d_modelPar_DLC_dX;
bool modelPar_given_DLC;
double modelPar_LLC;
double d_modelPar_LLC_dX;
bool modelPar_given_LLC;
double modelPar_LWC;
double d_modelPar_LWC_dX;
bool modelPar_given_LWC;
double modelPar_LWLC;
double d_modelPar_LWLC_dX;
bool modelPar_given_LWLC;
double modelPar_DWC;
double d_modelPar_DWC_dX;
bool modelPar_given_DWC;
double modelPar_WLC;
double d_modelPar_WLC_dX;
bool modelPar_given_WLC;
double modelPar_WWC;
double d_modelPar_WWC_dX;
bool modelPar_given_WWC;
double modelPar_WWLC;
double d_modelPar_WWLC_dX;
bool modelPar_given_WWLC;
double modelPar_TOXE;
double d_modelPar_TOXE_dX;
bool modelPar_given_TOXE;
double modelPar_TOXP;
double d_modelPar_TOXP_dX;
bool modelPar_given_TOXP;
double modelPar_DTOX;
double d_modelPar_DTOX_dX;
bool modelPar_given_DTOX;
double modelPar_NDEP;
double d_modelPar_NDEP_dX;
bool modelPar_given_NDEP;
double modelPar_NDEPL1;
double d_modelPar_NDEPL1_dX;
bool modelPar_given_NDEPL1;
double modelPar_NDEPLEXP1;
double d_modelPar_NDEPLEXP1_dX;
bool modelPar_given_NDEPLEXP1;
double modelPar_NDEPL2;
double d_modelPar_NDEPL2_dX;
bool modelPar_given_NDEPL2;
double modelPar_NDEPLEXP2;
double d_modelPar_NDEPLEXP2_dX;
bool modelPar_given_NDEPLEXP2;
double modelPar_NDEPW;
double d_modelPar_NDEPW_dX;
bool modelPar_given_NDEPW;
double modelPar_NDEPWEXP;
double d_modelPar_NDEPWEXP_dX;
bool modelPar_given_NDEPWEXP;
double modelPar_NDEPWL;
double d_modelPar_NDEPWL_dX;
bool modelPar_given_NDEPWL;
double modelPar_NDEPWLEXP;
double d_modelPar_NDEPWLEXP_dX;
bool modelPar_given_NDEPWLEXP;
double modelPar_LNDEP;
double d_modelPar_LNDEP_dX;
bool modelPar_given_LNDEP;
double modelPar_WNDEP;
double d_modelPar_WNDEP_dX;
bool modelPar_given_WNDEP;
double modelPar_PNDEP;
double d_modelPar_PNDEP_dX;
bool modelPar_given_PNDEP;
double modelPar_NDEPCV;
double d_modelPar_NDEPCV_dX;
bool modelPar_given_NDEPCV;
double modelPar_NDEPCVL1;
double d_modelPar_NDEPCVL1_dX;
bool modelPar_given_NDEPCVL1;
double modelPar_NDEPCVLEXP1;
double d_modelPar_NDEPCVLEXP1_dX;
bool modelPar_given_NDEPCVLEXP1;
double modelPar_NDEPCVL2;
double d_modelPar_NDEPCVL2_dX;
bool modelPar_given_NDEPCVL2;
double modelPar_NDEPCVLEXP2;
double d_modelPar_NDEPCVLEXP2_dX;
bool modelPar_given_NDEPCVLEXP2;
double modelPar_NDEPCVW;
double d_modelPar_NDEPCVW_dX;
bool modelPar_given_NDEPCVW;
double modelPar_NDEPCVWEXP;
double d_modelPar_NDEPCVWEXP_dX;
bool modelPar_given_NDEPCVWEXP;
double modelPar_NDEPCVWL;
double d_modelPar_NDEPCVWL_dX;
bool modelPar_given_NDEPCVWL;
double modelPar_NDEPCVWLEXP;
double d_modelPar_NDEPCVWLEXP_dX;
bool modelPar_given_NDEPCVWLEXP;
double modelPar_LNDEPCV;
double d_modelPar_LNDEPCV_dX;
bool modelPar_given_LNDEPCV;
double modelPar_WNDEPCV;
double d_modelPar_WNDEPCV_dX;
bool modelPar_given_WNDEPCV;
double modelPar_PNDEPCV;
double d_modelPar_PNDEPCV_dX;
bool modelPar_given_PNDEPCV;
double modelPar_NGATE;
double d_modelPar_NGATE_dX;
bool modelPar_given_NGATE;
double modelPar_LNGATE;
double d_modelPar_LNGATE_dX;
bool modelPar_given_LNGATE;
double modelPar_WNGATE;
double d_modelPar_WNGATE_dX;
bool modelPar_given_WNGATE;
double modelPar_PNGATE;
double d_modelPar_PNGATE_dX;
bool modelPar_given_PNGATE;
double modelPar_EASUB;
double d_modelPar_EASUB_dX;
bool modelPar_given_EASUB;
double modelPar_NI0SUB;
double d_modelPar_NI0SUB_dX;
bool modelPar_given_NI0SUB;
double modelPar_BG0SUB;
double d_modelPar_BG0SUB_dX;
bool modelPar_given_BG0SUB;
double modelPar_EPSRSUB;
double d_modelPar_EPSRSUB_dX;
bool modelPar_given_EPSRSUB;
double modelPar_EPSROX;
double d_modelPar_EPSROX_dX;
bool modelPar_given_EPSROX;
double modelPar_XJ;
double d_modelPar_XJ_dX;
bool modelPar_given_XJ;
double modelPar_LXJ;
double d_modelPar_LXJ_dX;
bool modelPar_given_LXJ;
double modelPar_WXJ;
double d_modelPar_WXJ_dX;
bool modelPar_given_WXJ;
double modelPar_PXJ;
double d_modelPar_PXJ_dX;
bool modelPar_given_PXJ;
double modelPar_LVFB;
double d_modelPar_LVFB_dX;
bool modelPar_given_LVFB;
double modelPar_WVFB;
double d_modelPar_WVFB_dX;
bool modelPar_given_WVFB;
double modelPar_PVFB;
double d_modelPar_PVFB_dX;
bool modelPar_given_PVFB;
double modelPar_VFB;
double d_modelPar_VFB_dX;
bool modelPar_given_VFB;
double modelPar_VFBCV;
double d_modelPar_VFBCV_dX;
bool modelPar_given_VFBCV;
double modelPar_LVFBCV;
double d_modelPar_LVFBCV_dX;
bool modelPar_given_LVFBCV;
double modelPar_WVFBCV;
double d_modelPar_WVFBCV_dX;
bool modelPar_given_WVFBCV;
double modelPar_PVFBCV;
double d_modelPar_PVFBCV_dX;
bool modelPar_given_PVFBCV;
double modelPar_VFBCVL;
double d_modelPar_VFBCVL_dX;
bool modelPar_given_VFBCVL;
double modelPar_VFBCVLEXP;
double d_modelPar_VFBCVLEXP_dX;
bool modelPar_given_VFBCVLEXP;
double modelPar_VFBCVW;
double d_modelPar_VFBCVW_dX;
bool modelPar_given_VFBCVW;
double modelPar_VFBCVWEXP;
double d_modelPar_VFBCVWEXP_dX;
bool modelPar_given_VFBCVWEXP;
double modelPar_VFBCVWL;
double d_modelPar_VFBCVWL_dX;
bool modelPar_given_VFBCVWL;
double modelPar_VFBCVWLEXP;
double d_modelPar_VFBCVWLEXP_dX;
bool modelPar_given_VFBCVWLEXP;
double modelPar_DWJ;
double d_modelPar_DWJ_dX;
bool modelPar_given_DWJ;
double modelPar_NSD;
double d_modelPar_NSD_dX;
bool modelPar_given_NSD;
double modelPar_LNSD;
double d_modelPar_LNSD_dX;
bool modelPar_given_LNSD;
double modelPar_WNSD;
double d_modelPar_WNSD_dX;
bool modelPar_given_WNSD;
double modelPar_PNSD;
double d_modelPar_PNSD_dX;
bool modelPar_given_PNSD;
double modelPar_DELVT0;
double d_modelPar_DELVT0_dX;
bool modelPar_given_DELVT0;
double modelPar_DVTP0;
double d_modelPar_DVTP0_dX;
bool modelPar_given_DVTP0;
double modelPar_LDVTP0;
double d_modelPar_LDVTP0_dX;
bool modelPar_given_LDVTP0;
double modelPar_WDVTP0;
double d_modelPar_WDVTP0_dX;
bool modelPar_given_WDVTP0;
double modelPar_PDVTP0;
double d_modelPar_PDVTP0_dX;
bool modelPar_given_PDVTP0;
double modelPar_DVTP1;
double d_modelPar_DVTP1_dX;
bool modelPar_given_DVTP1;
double modelPar_LDVTP1;
double d_modelPar_LDVTP1_dX;
bool modelPar_given_LDVTP1;
double modelPar_WDVTP1;
double d_modelPar_WDVTP1_dX;
bool modelPar_given_WDVTP1;
double modelPar_PDVTP1;
double d_modelPar_PDVTP1_dX;
bool modelPar_given_PDVTP1;
double modelPar_DVTP2;
double d_modelPar_DVTP2_dX;
bool modelPar_given_DVTP2;
double modelPar_LDVTP2;
double d_modelPar_LDVTP2_dX;
bool modelPar_given_LDVTP2;
double modelPar_WDVTP2;
double d_modelPar_WDVTP2_dX;
bool modelPar_given_WDVTP2;
double modelPar_PDVTP2;
double d_modelPar_PDVTP2_dX;
bool modelPar_given_PDVTP2;
double modelPar_DVTP3;
double d_modelPar_DVTP3_dX;
bool modelPar_given_DVTP3;
double modelPar_LDVTP3;
double d_modelPar_LDVTP3_dX;
bool modelPar_given_LDVTP3;
double modelPar_WDVTP3;
double d_modelPar_WDVTP3_dX;
bool modelPar_given_WDVTP3;
double modelPar_PDVTP3;
double d_modelPar_PDVTP3_dX;
bool modelPar_given_PDVTP3;
double modelPar_DVTP4;
double d_modelPar_DVTP4_dX;
bool modelPar_given_DVTP4;
double modelPar_LDVTP4;
double d_modelPar_LDVTP4_dX;
bool modelPar_given_LDVTP4;
double modelPar_WDVTP4;
double d_modelPar_WDVTP4_dX;
bool modelPar_given_WDVTP4;
double modelPar_PDVTP4;
double d_modelPar_PDVTP4_dX;
bool modelPar_given_PDVTP4;
double modelPar_DVTP5;
double d_modelPar_DVTP5_dX;
bool modelPar_given_DVTP5;
double modelPar_LDVTP5;
double d_modelPar_LDVTP5_dX;
bool modelPar_given_LDVTP5;
double modelPar_WDVTP5;
double d_modelPar_WDVTP5_dX;
bool modelPar_given_WDVTP5;
double modelPar_PDVTP5;
double d_modelPar_PDVTP5_dX;
bool modelPar_given_PDVTP5;
double modelPar_PHIN;
double d_modelPar_PHIN_dX;
bool modelPar_given_PHIN;
double modelPar_LPHIN;
double d_modelPar_LPHIN_dX;
bool modelPar_given_LPHIN;
double modelPar_WPHIN;
double d_modelPar_WPHIN_dX;
bool modelPar_given_WPHIN;
double modelPar_PPHIN;
double d_modelPar_PPHIN_dX;
bool modelPar_given_PPHIN;
double modelPar_ETA0;
double d_modelPar_ETA0_dX;
bool modelPar_given_ETA0;
double modelPar_LETA0;
double d_modelPar_LETA0_dX;
bool modelPar_given_LETA0;
double modelPar_WETA0;
double d_modelPar_WETA0_dX;
bool modelPar_given_WETA0;
double modelPar_PETA0;
double d_modelPar_PETA0_dX;
bool modelPar_given_PETA0;
double modelPar_ETA0R;
double d_modelPar_ETA0R_dX;
bool modelPar_given_ETA0R;
double modelPar_LETA0R;
double d_modelPar_LETA0R_dX;
bool modelPar_given_LETA0R;
double modelPar_WETA0R;
double d_modelPar_WETA0R_dX;
bool modelPar_given_WETA0R;
double modelPar_PETA0R;
double d_modelPar_PETA0R_dX;
bool modelPar_given_PETA0R;
double modelPar_DSUB;
double d_modelPar_DSUB_dX;
bool modelPar_given_DSUB;
double modelPar_ETAB;
double d_modelPar_ETAB_dX;
bool modelPar_given_ETAB;
double modelPar_ETABEXP;
double d_modelPar_ETABEXP_dX;
bool modelPar_given_ETABEXP;
double modelPar_LETAB;
double d_modelPar_LETAB_dX;
bool modelPar_given_LETAB;
double modelPar_WETAB;
double d_modelPar_WETAB_dX;
bool modelPar_given_WETAB;
double modelPar_PETAB;
double d_modelPar_PETAB_dX;
bool modelPar_given_PETAB;
double modelPar_K1;
double d_modelPar_K1_dX;
bool modelPar_given_K1;
double modelPar_K1L;
double d_modelPar_K1L_dX;
bool modelPar_given_K1L;
double modelPar_K1LEXP;
double d_modelPar_K1LEXP_dX;
bool modelPar_given_K1LEXP;
double modelPar_K1W;
double d_modelPar_K1W_dX;
bool modelPar_given_K1W;
double modelPar_K1WEXP;
double d_modelPar_K1WEXP_dX;
bool modelPar_given_K1WEXP;
double modelPar_K1WL;
double d_modelPar_K1WL_dX;
bool modelPar_given_K1WL;
double modelPar_K1WLEXP;
double d_modelPar_K1WLEXP_dX;
bool modelPar_given_K1WLEXP;
double modelPar_LK1;
double d_modelPar_LK1_dX;
bool modelPar_given_LK1;
double modelPar_WK1;
double d_modelPar_WK1_dX;
bool modelPar_given_WK1;
double modelPar_PK1;
double d_modelPar_PK1_dX;
bool modelPar_given_PK1;
double modelPar_K2;
double d_modelPar_K2_dX;
bool modelPar_given_K2;
double modelPar_K2L;
double d_modelPar_K2L_dX;
bool modelPar_given_K2L;
double modelPar_K2LEXP;
double d_modelPar_K2LEXP_dX;
bool modelPar_given_K2LEXP;
double modelPar_K2W;
double d_modelPar_K2W_dX;
bool modelPar_given_K2W;
double modelPar_K2WEXP;
double d_modelPar_K2WEXP_dX;
bool modelPar_given_K2WEXP;
double modelPar_K2WL;
double d_modelPar_K2WL_dX;
bool modelPar_given_K2WL;
double modelPar_K2WLEXP;
double d_modelPar_K2WLEXP_dX;
bool modelPar_given_K2WLEXP;
double modelPar_LK2;
double d_modelPar_LK2_dX;
bool modelPar_given_LK2;
double modelPar_WK2;
double d_modelPar_WK2_dX;
bool modelPar_given_WK2;
double modelPar_PK2;
double d_modelPar_PK2_dX;
bool modelPar_given_PK2;
double modelPar_ADOS;
double d_modelPar_ADOS_dX;
bool modelPar_given_ADOS;
double modelPar_BDOS;
double d_modelPar_BDOS_dX;
bool modelPar_given_BDOS;
double modelPar_QM0;
double d_modelPar_QM0_dX;
bool modelPar_given_QM0;
double modelPar_ETAQM;
double d_modelPar_ETAQM_dX;
bool modelPar_given_ETAQM;
double modelPar_CIT;
double d_modelPar_CIT_dX;
bool modelPar_given_CIT;
double modelPar_LCIT;
double d_modelPar_LCIT_dX;
bool modelPar_given_LCIT;
double modelPar_WCIT;
double d_modelPar_WCIT_dX;
bool modelPar_given_WCIT;
double modelPar_PCIT;
double d_modelPar_PCIT_dX;
bool modelPar_given_PCIT;
double modelPar_NFACTOR;
double d_modelPar_NFACTOR_dX;
bool modelPar_given_NFACTOR;
double modelPar_NFACTORL;
double d_modelPar_NFACTORL_dX;
bool modelPar_given_NFACTORL;
double modelPar_NFACTORLEXP;
double d_modelPar_NFACTORLEXP_dX;
bool modelPar_given_NFACTORLEXP;
double modelPar_NFACTORW;
double d_modelPar_NFACTORW_dX;
bool modelPar_given_NFACTORW;
double modelPar_NFACTORWEXP;
double d_modelPar_NFACTORWEXP_dX;
bool modelPar_given_NFACTORWEXP;
double modelPar_NFACTORWL;
double d_modelPar_NFACTORWL_dX;
bool modelPar_given_NFACTORWL;
double modelPar_NFACTORWLEXP;
double d_modelPar_NFACTORWLEXP_dX;
bool modelPar_given_NFACTORWLEXP;
double modelPar_LNFACTOR;
double d_modelPar_LNFACTOR_dX;
bool modelPar_given_LNFACTOR;
double modelPar_WNFACTOR;
double d_modelPar_WNFACTOR_dX;
bool modelPar_given_WNFACTOR;
double modelPar_PNFACTOR;
double d_modelPar_PNFACTOR_dX;
bool modelPar_given_PNFACTOR;
double modelPar_CDSCD;
double d_modelPar_CDSCD_dX;
bool modelPar_given_CDSCD;
double modelPar_CDSCDL;
double d_modelPar_CDSCDL_dX;
bool modelPar_given_CDSCDL;
double modelPar_CDSCDLEXP;
double d_modelPar_CDSCDLEXP_dX;
bool modelPar_given_CDSCDLEXP;
double modelPar_LCDSCD;
double d_modelPar_LCDSCD_dX;
bool modelPar_given_LCDSCD;
double modelPar_WCDSCD;
double d_modelPar_WCDSCD_dX;
bool modelPar_given_WCDSCD;
double modelPar_PCDSCD;
double d_modelPar_PCDSCD_dX;
bool modelPar_given_PCDSCD;
double modelPar_CDSCDR;
double d_modelPar_CDSCDR_dX;
bool modelPar_given_CDSCDR;
double modelPar_CDSCDLR;
double d_modelPar_CDSCDLR_dX;
bool modelPar_given_CDSCDLR;
double modelPar_LCDSCDR;
double d_modelPar_LCDSCDR_dX;
bool modelPar_given_LCDSCDR;
double modelPar_WCDSCDR;
double d_modelPar_WCDSCDR_dX;
bool modelPar_given_WCDSCDR;
double modelPar_PCDSCDR;
double d_modelPar_PCDSCDR_dX;
bool modelPar_given_PCDSCDR;
double modelPar_CDSCB;
double d_modelPar_CDSCB_dX;
bool modelPar_given_CDSCB;
double modelPar_CDSCBL;
double d_modelPar_CDSCBL_dX;
bool modelPar_given_CDSCBL;
double modelPar_CDSCBLEXP;
double d_modelPar_CDSCBLEXP_dX;
bool modelPar_given_CDSCBLEXP;
double modelPar_LCDSCB;
double d_modelPar_LCDSCB_dX;
bool modelPar_given_LCDSCB;
double modelPar_WCDSCB;
double d_modelPar_WCDSCB_dX;
bool modelPar_given_WCDSCB;
double modelPar_PCDSCB;
double d_modelPar_PCDSCB_dX;
bool modelPar_given_PCDSCB;
double modelPar_VSAT;
double d_modelPar_VSAT_dX;
bool modelPar_given_VSAT;
double modelPar_LVSAT;
double d_modelPar_LVSAT_dX;
bool modelPar_given_LVSAT;
double modelPar_WVSAT;
double d_modelPar_WVSAT_dX;
bool modelPar_given_WVSAT;
double modelPar_PVSAT;
double d_modelPar_PVSAT_dX;
bool modelPar_given_PVSAT;
double modelPar_VSATL;
double d_modelPar_VSATL_dX;
bool modelPar_given_VSATL;
double modelPar_VSATLEXP;
double d_modelPar_VSATLEXP_dX;
bool modelPar_given_VSATLEXP;
double modelPar_VSATW;
double d_modelPar_VSATW_dX;
bool modelPar_given_VSATW;
double modelPar_VSATWEXP;
double d_modelPar_VSATWEXP_dX;
bool modelPar_given_VSATWEXP;
double modelPar_VSATWL;
double d_modelPar_VSATWL_dX;
bool modelPar_given_VSATWL;
double modelPar_VSATWLEXP;
double d_modelPar_VSATWLEXP_dX;
bool modelPar_given_VSATWLEXP;
double modelPar_VSATR;
double d_modelPar_VSATR_dX;
bool modelPar_given_VSATR;
double modelPar_LVSATR;
double d_modelPar_LVSATR_dX;
bool modelPar_given_LVSATR;
double modelPar_WVSATR;
double d_modelPar_WVSATR_dX;
bool modelPar_given_WVSATR;
double modelPar_PVSATR;
double d_modelPar_PVSATR_dX;
bool modelPar_given_PVSATR;
double modelPar_DELTA;
double d_modelPar_DELTA_dX;
bool modelPar_given_DELTA;
double modelPar_LDELTA;
double d_modelPar_LDELTA_dX;
bool modelPar_given_LDELTA;
double modelPar_WDELTA;
double d_modelPar_WDELTA_dX;
bool modelPar_given_WDELTA;
double modelPar_PDELTA;
double d_modelPar_PDELTA_dX;
bool modelPar_given_PDELTA;
double modelPar_DELTAL;
double d_modelPar_DELTAL_dX;
bool modelPar_given_DELTAL;
double modelPar_DELTALEXP;
double d_modelPar_DELTALEXP_dX;
bool modelPar_given_DELTALEXP;
double modelPar_VSATCV;
double d_modelPar_VSATCV_dX;
bool modelPar_given_VSATCV;
double modelPar_LVSATCV;
double d_modelPar_LVSATCV_dX;
bool modelPar_given_LVSATCV;
double modelPar_WVSATCV;
double d_modelPar_WVSATCV_dX;
bool modelPar_given_WVSATCV;
double modelPar_PVSATCV;
double d_modelPar_PVSATCV_dX;
bool modelPar_given_PVSATCV;
double modelPar_VSATCVL;
double d_modelPar_VSATCVL_dX;
bool modelPar_given_VSATCVL;
double modelPar_VSATCVLEXP;
double d_modelPar_VSATCVLEXP_dX;
bool modelPar_given_VSATCVLEXP;
double modelPar_VSATCVW;
double d_modelPar_VSATCVW_dX;
bool modelPar_given_VSATCVW;
double modelPar_VSATCVWEXP;
double d_modelPar_VSATCVWEXP_dX;
bool modelPar_given_VSATCVWEXP;
double modelPar_VSATCVWL;
double d_modelPar_VSATCVWL_dX;
bool modelPar_given_VSATCVWL;
double modelPar_VSATCVWLEXP;
double d_modelPar_VSATCVWLEXP_dX;
bool modelPar_given_VSATCVWLEXP;
double modelPar_UP1;
double d_modelPar_UP1_dX;
bool modelPar_given_UP1;
double modelPar_LP1;
double d_modelPar_LP1_dX;
bool modelPar_given_LP1;
double modelPar_UP2;
double d_modelPar_UP2_dX;
bool modelPar_given_UP2;
double modelPar_LP2;
double d_modelPar_LP2_dX;
bool modelPar_given_LP2;
double modelPar_MULU0;
double d_modelPar_MULU0_dX;
bool modelPar_given_MULU0;
double modelPar_U0;
double d_modelPar_U0_dX;
bool modelPar_given_U0;
double modelPar_U0L;
double d_modelPar_U0L_dX;
bool modelPar_given_U0L;
double modelPar_U0LEXP;
double d_modelPar_U0LEXP_dX;
bool modelPar_given_U0LEXP;
double modelPar_LU0;
double d_modelPar_LU0_dX;
bool modelPar_given_LU0;
double modelPar_WU0;
double d_modelPar_WU0_dX;
bool modelPar_given_WU0;
double modelPar_PU0;
double d_modelPar_PU0_dX;
bool modelPar_given_PU0;
double modelPar_U0R;
double d_modelPar_U0R_dX;
bool modelPar_given_U0R;
double modelPar_LU0R;
double d_modelPar_LU0R_dX;
bool modelPar_given_LU0R;
double modelPar_WU0R;
double d_modelPar_WU0R_dX;
bool modelPar_given_WU0R;
double modelPar_PU0R;
double d_modelPar_PU0R_dX;
bool modelPar_given_PU0R;
double modelPar_ETAMOB;
double d_modelPar_ETAMOB_dX;
bool modelPar_given_ETAMOB;
double modelPar_UA;
double d_modelPar_UA_dX;
bool modelPar_given_UA;
double modelPar_UAL;
double d_modelPar_UAL_dX;
bool modelPar_given_UAL;
double modelPar_UALEXP;
double d_modelPar_UALEXP_dX;
bool modelPar_given_UALEXP;
double modelPar_UAW;
double d_modelPar_UAW_dX;
bool modelPar_given_UAW;
double modelPar_UAWEXP;
double d_modelPar_UAWEXP_dX;
bool modelPar_given_UAWEXP;
double modelPar_UAWL;
double d_modelPar_UAWL_dX;
bool modelPar_given_UAWL;
double modelPar_UAWLEXP;
double d_modelPar_UAWLEXP_dX;
bool modelPar_given_UAWLEXP;
double modelPar_LUA;
double d_modelPar_LUA_dX;
bool modelPar_given_LUA;
double modelPar_WUA;
double d_modelPar_WUA_dX;
bool modelPar_given_WUA;
double modelPar_PUA;
double d_modelPar_PUA_dX;
bool modelPar_given_PUA;
double modelPar_UAR;
double d_modelPar_UAR_dX;
bool modelPar_given_UAR;
double modelPar_LUAR;
double d_modelPar_LUAR_dX;
bool modelPar_given_LUAR;
double modelPar_WUAR;
double d_modelPar_WUAR_dX;
bool modelPar_given_WUAR;
double modelPar_PUAR;
double d_modelPar_PUAR_dX;
bool modelPar_given_PUAR;
double modelPar_EU;
double d_modelPar_EU_dX;
bool modelPar_given_EU;
double modelPar_LEU;
double d_modelPar_LEU_dX;
bool modelPar_given_LEU;
double modelPar_WEU;
double d_modelPar_WEU_dX;
bool modelPar_given_WEU;
double modelPar_PEU;
double d_modelPar_PEU_dX;
bool modelPar_given_PEU;
double modelPar_EUL;
double d_modelPar_EUL_dX;
bool modelPar_given_EUL;
double modelPar_EULEXP;
double d_modelPar_EULEXP_dX;
bool modelPar_given_EULEXP;
double modelPar_EUW;
double d_modelPar_EUW_dX;
bool modelPar_given_EUW;
double modelPar_EUWEXP;
double d_modelPar_EUWEXP_dX;
bool modelPar_given_EUWEXP;
double modelPar_EUWL;
double d_modelPar_EUWL_dX;
bool modelPar_given_EUWL;
double modelPar_EUWLEXP;
double d_modelPar_EUWLEXP_dX;
bool modelPar_given_EUWLEXP;
double modelPar_UD;
double d_modelPar_UD_dX;
bool modelPar_given_UD;
double modelPar_UDL;
double d_modelPar_UDL_dX;
bool modelPar_given_UDL;
double modelPar_UDLEXP;
double d_modelPar_UDLEXP_dX;
bool modelPar_given_UDLEXP;
double modelPar_LUD;
double d_modelPar_LUD_dX;
bool modelPar_given_LUD;
double modelPar_WUD;
double d_modelPar_WUD_dX;
bool modelPar_given_WUD;
double modelPar_PUD;
double d_modelPar_PUD_dX;
bool modelPar_given_PUD;
double modelPar_UDR;
double d_modelPar_UDR_dX;
bool modelPar_given_UDR;
double modelPar_LUDR;
double d_modelPar_LUDR_dX;
bool modelPar_given_LUDR;
double modelPar_WUDR;
double d_modelPar_WUDR_dX;
bool modelPar_given_WUDR;
double modelPar_PUDR;
double d_modelPar_PUDR_dX;
bool modelPar_given_PUDR;
double modelPar_UCS;
double d_modelPar_UCS_dX;
bool modelPar_given_UCS;
double modelPar_LUCS;
double d_modelPar_LUCS_dX;
bool modelPar_given_LUCS;
double modelPar_WUCS;
double d_modelPar_WUCS_dX;
bool modelPar_given_WUCS;
double modelPar_PUCS;
double d_modelPar_PUCS_dX;
bool modelPar_given_PUCS;
double modelPar_UCSR;
double d_modelPar_UCSR_dX;
bool modelPar_given_UCSR;
double modelPar_LUCSR;
double d_modelPar_LUCSR_dX;
bool modelPar_given_LUCSR;
double modelPar_WUCSR;
double d_modelPar_WUCSR_dX;
bool modelPar_given_WUCSR;
double modelPar_PUCSR;
double d_modelPar_PUCSR_dX;
bool modelPar_given_PUCSR;
double modelPar_UC;
double d_modelPar_UC_dX;
bool modelPar_given_UC;
double modelPar_UCL;
double d_modelPar_UCL_dX;
bool modelPar_given_UCL;
double modelPar_UCLEXP;
double d_modelPar_UCLEXP_dX;
bool modelPar_given_UCLEXP;
double modelPar_UCW;
double d_modelPar_UCW_dX;
bool modelPar_given_UCW;
double modelPar_UCWEXP;
double d_modelPar_UCWEXP_dX;
bool modelPar_given_UCWEXP;
double modelPar_UCWL;
double d_modelPar_UCWL_dX;
bool modelPar_given_UCWL;
double modelPar_UCWLEXP;
double d_modelPar_UCWLEXP_dX;
bool modelPar_given_UCWLEXP;
double modelPar_LUC;
double d_modelPar_LUC_dX;
bool modelPar_given_LUC;
double modelPar_WUC;
double d_modelPar_WUC_dX;
bool modelPar_given_WUC;
double modelPar_PUC;
double d_modelPar_PUC_dX;
bool modelPar_given_PUC;
double modelPar_UCR;
double d_modelPar_UCR_dX;
bool modelPar_given_UCR;
double modelPar_LUCR;
double d_modelPar_LUCR_dX;
bool modelPar_given_LUCR;
double modelPar_WUCR;
double d_modelPar_WUCR_dX;
bool modelPar_given_WUCR;
double modelPar_PUCR;
double d_modelPar_PUCR_dX;
bool modelPar_given_PUCR;
double modelPar_PCLM;
double d_modelPar_PCLM_dX;
bool modelPar_given_PCLM;
double modelPar_PCLML;
double d_modelPar_PCLML_dX;
bool modelPar_given_PCLML;
double modelPar_PCLMLEXP;
double d_modelPar_PCLMLEXP_dX;
bool modelPar_given_PCLMLEXP;
double modelPar_LPCLM;
double d_modelPar_LPCLM_dX;
bool modelPar_given_LPCLM;
double modelPar_WPCLM;
double d_modelPar_WPCLM_dX;
bool modelPar_given_WPCLM;
double modelPar_PPCLM;
double d_modelPar_PPCLM_dX;
bool modelPar_given_PPCLM;
double modelPar_PCLMR;
double d_modelPar_PCLMR_dX;
bool modelPar_given_PCLMR;
double modelPar_LPCLMR;
double d_modelPar_LPCLMR_dX;
bool modelPar_given_LPCLMR;
double modelPar_WPCLMR;
double d_modelPar_WPCLMR_dX;
bool modelPar_given_WPCLMR;
double modelPar_PPCLMR;
double d_modelPar_PPCLMR_dX;
bool modelPar_given_PPCLMR;
double modelPar_PCLMG;
double d_modelPar_PCLMG_dX;
bool modelPar_given_PCLMG;
double modelPar_PCLMCV;
double d_modelPar_PCLMCV_dX;
bool modelPar_given_PCLMCV;
double modelPar_PCLMCVL;
double d_modelPar_PCLMCVL_dX;
bool modelPar_given_PCLMCVL;
double modelPar_PCLMCVLEXP;
double d_modelPar_PCLMCVLEXP_dX;
bool modelPar_given_PCLMCVLEXP;
double modelPar_LPCLMCV;
double d_modelPar_LPCLMCV_dX;
bool modelPar_given_LPCLMCV;
double modelPar_WPCLMCV;
double d_modelPar_WPCLMCV_dX;
bool modelPar_given_WPCLMCV;
double modelPar_PPCLMCV;
double d_modelPar_PPCLMCV_dX;
bool modelPar_given_PPCLMCV;
double modelPar_PSCBE1;
double d_modelPar_PSCBE1_dX;
bool modelPar_given_PSCBE1;
double modelPar_LPSCBE1;
double d_modelPar_LPSCBE1_dX;
bool modelPar_given_LPSCBE1;
double modelPar_WPSCBE1;
double d_modelPar_WPSCBE1_dX;
bool modelPar_given_WPSCBE1;
double modelPar_PPSCBE1;
double d_modelPar_PPSCBE1_dX;
bool modelPar_given_PPSCBE1;
double modelPar_PSCBE2;
double d_modelPar_PSCBE2_dX;
bool modelPar_given_PSCBE2;
double modelPar_LPSCBE2;
double d_modelPar_LPSCBE2_dX;
bool modelPar_given_LPSCBE2;
double modelPar_WPSCBE2;
double d_modelPar_WPSCBE2_dX;
bool modelPar_given_WPSCBE2;
double modelPar_PPSCBE2;
double d_modelPar_PPSCBE2_dX;
bool modelPar_given_PPSCBE2;
double modelPar_PDITS;
double d_modelPar_PDITS_dX;
bool modelPar_given_PDITS;
double modelPar_LPDITS;
double d_modelPar_LPDITS_dX;
bool modelPar_given_LPDITS;
double modelPar_WPDITS;
double d_modelPar_WPDITS_dX;
bool modelPar_given_WPDITS;
double modelPar_PPDITS;
double d_modelPar_PPDITS_dX;
bool modelPar_given_PPDITS;
double modelPar_PDITSL;
double d_modelPar_PDITSL_dX;
bool modelPar_given_PDITSL;
double modelPar_PDITSD;
double d_modelPar_PDITSD_dX;
bool modelPar_given_PDITSD;
double modelPar_LPDITSD;
double d_modelPar_LPDITSD_dX;
bool modelPar_given_LPDITSD;
double modelPar_WPDITSD;
double d_modelPar_WPDITSD_dX;
bool modelPar_given_WPDITSD;
double modelPar_PPDITSD;
double d_modelPar_PPDITSD_dX;
bool modelPar_given_PPDITSD;
double modelPar_RSH;
double d_modelPar_RSH_dX;
bool modelPar_given_RSH;
double modelPar_PRWG;
double d_modelPar_PRWG_dX;
bool modelPar_given_PRWG;
double modelPar_LPRWG;
double d_modelPar_LPRWG_dX;
bool modelPar_given_LPRWG;
double modelPar_WPRWG;
double d_modelPar_WPRWG_dX;
bool modelPar_given_WPRWG;
double modelPar_PPRWG;
double d_modelPar_PPRWG_dX;
bool modelPar_given_PPRWG;
double modelPar_PRWB;
double d_modelPar_PRWB_dX;
bool modelPar_given_PRWB;
double modelPar_LPRWB;
double d_modelPar_LPRWB_dX;
bool modelPar_given_LPRWB;
double modelPar_WPRWB;
double d_modelPar_WPRWB_dX;
bool modelPar_given_WPRWB;
double modelPar_PPRWB;
double d_modelPar_PPRWB_dX;
bool modelPar_given_PPRWB;
double modelPar_PRWBL;
double d_modelPar_PRWBL_dX;
bool modelPar_given_PRWBL;
double modelPar_PRWBLEXP;
double d_modelPar_PRWBLEXP_dX;
bool modelPar_given_PRWBLEXP;
double modelPar_WR;
double d_modelPar_WR_dX;
bool modelPar_given_WR;
double modelPar_LWR;
double d_modelPar_LWR_dX;
bool modelPar_given_LWR;
double modelPar_WWR;
double d_modelPar_WWR_dX;
bool modelPar_given_WWR;
double modelPar_PWR;
double d_modelPar_PWR_dX;
bool modelPar_given_PWR;
double modelPar_RSWMIN;
double d_modelPar_RSWMIN_dX;
bool modelPar_given_RSWMIN;
double modelPar_LRSWMIN;
double d_modelPar_LRSWMIN_dX;
bool modelPar_given_LRSWMIN;
double modelPar_WRSWMIN;
double d_modelPar_WRSWMIN_dX;
bool modelPar_given_WRSWMIN;
double modelPar_PRSWMIN;
double d_modelPar_PRSWMIN_dX;
bool modelPar_given_PRSWMIN;
double modelPar_RSW;
double d_modelPar_RSW_dX;
bool modelPar_given_RSW;
double modelPar_LRSW;
double d_modelPar_LRSW_dX;
bool modelPar_given_LRSW;
double modelPar_WRSW;
double d_modelPar_WRSW_dX;
bool modelPar_given_WRSW;
double modelPar_PRSW;
double d_modelPar_PRSW_dX;
bool modelPar_given_PRSW;
double modelPar_RSWL;
double d_modelPar_RSWL_dX;
bool modelPar_given_RSWL;
double modelPar_RSWLEXP;
double d_modelPar_RSWLEXP_dX;
bool modelPar_given_RSWLEXP;
double modelPar_RDWMIN;
double d_modelPar_RDWMIN_dX;
bool modelPar_given_RDWMIN;
double modelPar_LRDWMIN;
double d_modelPar_LRDWMIN_dX;
bool modelPar_given_LRDWMIN;
double modelPar_WRDWMIN;
double d_modelPar_WRDWMIN_dX;
bool modelPar_given_WRDWMIN;
double modelPar_PRDWMIN;
double d_modelPar_PRDWMIN_dX;
bool modelPar_given_PRDWMIN;
double modelPar_RDW;
double d_modelPar_RDW_dX;
bool modelPar_given_RDW;
double modelPar_LRDW;
double d_modelPar_LRDW_dX;
bool modelPar_given_LRDW;
double modelPar_WRDW;
double d_modelPar_WRDW_dX;
bool modelPar_given_WRDW;
double modelPar_PRDW;
double d_modelPar_PRDW_dX;
bool modelPar_given_PRDW;
double modelPar_RDWL;
double d_modelPar_RDWL_dX;
bool modelPar_given_RDWL;
double modelPar_RDWLEXP;
double d_modelPar_RDWLEXP_dX;
bool modelPar_given_RDWLEXP;
double modelPar_RDSWMIN;
double d_modelPar_RDSWMIN_dX;
bool modelPar_given_RDSWMIN;
double modelPar_LRDSWMIN;
double d_modelPar_LRDSWMIN_dX;
bool modelPar_given_LRDSWMIN;
double modelPar_WRDSWMIN;
double d_modelPar_WRDSWMIN_dX;
bool modelPar_given_WRDSWMIN;
double modelPar_PRDSWMIN;
double d_modelPar_PRDSWMIN_dX;
bool modelPar_given_PRDSWMIN;
double modelPar_RDSW;
double d_modelPar_RDSW_dX;
bool modelPar_given_RDSW;
double modelPar_RDSWL;
double d_modelPar_RDSWL_dX;
bool modelPar_given_RDSWL;
double modelPar_RDSWLEXP;
double d_modelPar_RDSWLEXP_dX;
bool modelPar_given_RDSWLEXP;
double modelPar_LRDSW;
double d_modelPar_LRDSW_dX;
bool modelPar_given_LRDSW;
double modelPar_WRDSW;
double d_modelPar_WRDSW_dX;
bool modelPar_given_WRDSW;
double modelPar_PRDSW;
double d_modelPar_PRDSW_dX;
bool modelPar_given_PRDSW;
double modelPar_PSAT;
double d_modelPar_PSAT_dX;
bool modelPar_given_PSAT;
double modelPar_LPSAT;
double d_modelPar_LPSAT_dX;
bool modelPar_given_LPSAT;
double modelPar_WPSAT;
double d_modelPar_WPSAT_dX;
bool modelPar_given_WPSAT;
double modelPar_PPSAT;
double d_modelPar_PPSAT_dX;
bool modelPar_given_PPSAT;
double modelPar_PSATL;
double d_modelPar_PSATL_dX;
bool modelPar_given_PSATL;
double modelPar_PSATLEXP;
double d_modelPar_PSATLEXP_dX;
bool modelPar_given_PSATLEXP;
double modelPar_PSATB;
double d_modelPar_PSATB_dX;
bool modelPar_given_PSATB;
double modelPar_PSATR;
double d_modelPar_PSATR_dX;
bool modelPar_given_PSATR;
double modelPar_LPSATR;
double d_modelPar_LPSATR_dX;
bool modelPar_given_LPSATR;
double modelPar_WPSATR;
double d_modelPar_WPSATR_dX;
bool modelPar_given_WPSATR;
double modelPar_PPSATR;
double d_modelPar_PPSATR_dX;
bool modelPar_given_PPSATR;
double modelPar_LPSATB;
double d_modelPar_LPSATB_dX;
bool modelPar_given_LPSATB;
double modelPar_WPSATB;
double d_modelPar_WPSATB_dX;
bool modelPar_given_WPSATB;
double modelPar_PPSATB;
double d_modelPar_PPSATB_dX;
bool modelPar_given_PPSATB;
double modelPar_PSATX;
double d_modelPar_PSATX_dX;
bool modelPar_given_PSATX;
double modelPar_PTWG;
double d_modelPar_PTWG_dX;
bool modelPar_given_PTWG;
double modelPar_LPTWG;
double d_modelPar_LPTWG_dX;
bool modelPar_given_LPTWG;
double modelPar_WPTWG;
double d_modelPar_WPTWG_dX;
bool modelPar_given_WPTWG;
double modelPar_PPTWG;
double d_modelPar_PPTWG_dX;
bool modelPar_given_PPTWG;
double modelPar_PTWGL;
double d_modelPar_PTWGL_dX;
bool modelPar_given_PTWGL;
double modelPar_PTWGLEXP;
double d_modelPar_PTWGLEXP_dX;
bool modelPar_given_PTWGLEXP;
double modelPar_PTWGR;
double d_modelPar_PTWGR_dX;
bool modelPar_given_PTWGR;
double modelPar_LPTWGR;
double d_modelPar_LPTWGR_dX;
bool modelPar_given_LPTWGR;
double modelPar_WPTWGR;
double d_modelPar_WPTWGR_dX;
bool modelPar_given_WPTWGR;
double modelPar_PPTWGR;
double d_modelPar_PPTWGR_dX;
bool modelPar_given_PPTWGR;
double modelPar_PTWGLR;
double d_modelPar_PTWGLR_dX;
bool modelPar_given_PTWGLR;
double modelPar_PTWGLEXPR;
double d_modelPar_PTWGLEXPR_dX;
bool modelPar_given_PTWGLEXPR;
double modelPar_A1;
double d_modelPar_A1_dX;
bool modelPar_given_A1;
double modelPar_LA1;
double d_modelPar_LA1_dX;
bool modelPar_given_LA1;
double modelPar_WA1;
double d_modelPar_WA1_dX;
bool modelPar_given_WA1;
double modelPar_PA1;
double d_modelPar_PA1_dX;
bool modelPar_given_PA1;
double modelPar_A11;
double d_modelPar_A11_dX;
bool modelPar_given_A11;
double modelPar_LA11;
double d_modelPar_LA11_dX;
bool modelPar_given_LA11;
double modelPar_WA11;
double d_modelPar_WA11_dX;
bool modelPar_given_WA11;
double modelPar_PA11;
double d_modelPar_PA11_dX;
bool modelPar_given_PA11;
double modelPar_A2;
double d_modelPar_A2_dX;
bool modelPar_given_A2;
double modelPar_LA2;
double d_modelPar_LA2_dX;
bool modelPar_given_LA2;
double modelPar_WA2;
double d_modelPar_WA2_dX;
bool modelPar_given_WA2;
double modelPar_PA2;
double d_modelPar_PA2_dX;
bool modelPar_given_PA2;
double modelPar_A21;
double d_modelPar_A21_dX;
bool modelPar_given_A21;
double modelPar_LA21;
double d_modelPar_LA21_dX;
bool modelPar_given_LA21;
double modelPar_WA21;
double d_modelPar_WA21_dX;
bool modelPar_given_WA21;
double modelPar_PA21;
double d_modelPar_PA21_dX;
bool modelPar_given_PA21;
double modelPar_PDIBLC;
double d_modelPar_PDIBLC_dX;
bool modelPar_given_PDIBLC;
double modelPar_PDIBLCL;
double d_modelPar_PDIBLCL_dX;
bool modelPar_given_PDIBLCL;
double modelPar_PDIBLCLEXP;
double d_modelPar_PDIBLCLEXP_dX;
bool modelPar_given_PDIBLCLEXP;
double modelPar_LPDIBLC;
double d_modelPar_LPDIBLC_dX;
bool modelPar_given_LPDIBLC;
double modelPar_WPDIBLC;
double d_modelPar_WPDIBLC_dX;
bool modelPar_given_WPDIBLC;
double modelPar_PPDIBLC;
double d_modelPar_PPDIBLC_dX;
bool modelPar_given_PPDIBLC;
double modelPar_PDIBLCR;
double d_modelPar_PDIBLCR_dX;
bool modelPar_given_PDIBLCR;
double modelPar_PDIBLCLR;
double d_modelPar_PDIBLCLR_dX;
bool modelPar_given_PDIBLCLR;
double modelPar_PDIBLCLEXPR;
double d_modelPar_PDIBLCLEXPR_dX;
bool modelPar_given_PDIBLCLEXPR;
double modelPar_LPDIBLCR;
double d_modelPar_LPDIBLCR_dX;
bool modelPar_given_LPDIBLCR;
double modelPar_WPDIBLCR;
double d_modelPar_WPDIBLCR_dX;
bool modelPar_given_WPDIBLCR;
double modelPar_PPDIBLCR;
double d_modelPar_PPDIBLCR_dX;
bool modelPar_given_PPDIBLCR;
double modelPar_PDIBLCB;
double d_modelPar_PDIBLCB_dX;
bool modelPar_given_PDIBLCB;
double modelPar_LPDIBLCB;
double d_modelPar_LPDIBLCB_dX;
bool modelPar_given_LPDIBLCB;
double modelPar_WPDIBLCB;
double d_modelPar_WPDIBLCB_dX;
bool modelPar_given_WPDIBLCB;
double modelPar_PPDIBLCB;
double d_modelPar_PPDIBLCB_dX;
bool modelPar_given_PPDIBLCB;
double modelPar_PVAG;
double d_modelPar_PVAG_dX;
bool modelPar_given_PVAG;
double modelPar_LPVAG;
double d_modelPar_LPVAG_dX;
bool modelPar_given_LPVAG;
double modelPar_WPVAG;
double d_modelPar_WPVAG_dX;
bool modelPar_given_WPVAG;
double modelPar_PPVAG;
double d_modelPar_PPVAG_dX;
bool modelPar_given_PPVAG;
double modelPar_FPROUT;
double d_modelPar_FPROUT_dX;
bool modelPar_given_FPROUT;
double modelPar_FPROUTL;
double d_modelPar_FPROUTL_dX;
bool modelPar_given_FPROUTL;
double modelPar_FPROUTLEXP;
double d_modelPar_FPROUTLEXP_dX;
bool modelPar_given_FPROUTLEXP;
double modelPar_LFPROUT;
double d_modelPar_LFPROUT_dX;
bool modelPar_given_LFPROUT;
double modelPar_WFPROUT;
double d_modelPar_WFPROUT_dX;
bool modelPar_given_WFPROUT;
double modelPar_PFPROUT;
double d_modelPar_PFPROUT_dX;
bool modelPar_given_PFPROUT;
double modelPar_ALPHA0;
double d_modelPar_ALPHA0_dX;
bool modelPar_given_ALPHA0;
double modelPar_ALPHA0L;
double d_modelPar_ALPHA0L_dX;
bool modelPar_given_ALPHA0L;
double modelPar_ALPHA0LEXP;
double d_modelPar_ALPHA0LEXP_dX;
bool modelPar_given_ALPHA0LEXP;
double modelPar_LALPHA0;
double d_modelPar_LALPHA0_dX;
bool modelPar_given_LALPHA0;
double modelPar_WALPHA0;
double d_modelPar_WALPHA0_dX;
bool modelPar_given_WALPHA0;
double modelPar_PALPHA0;
double d_modelPar_PALPHA0_dX;
bool modelPar_given_PALPHA0;
double modelPar_BETA0;
double d_modelPar_BETA0_dX;
bool modelPar_given_BETA0;
double modelPar_LBETA0;
double d_modelPar_LBETA0_dX;
bool modelPar_given_LBETA0;
double modelPar_WBETA0;
double d_modelPar_WBETA0_dX;
bool modelPar_given_WBETA0;
double modelPar_PBETA0;
double d_modelPar_PBETA0_dX;
bool modelPar_given_PBETA0;
double modelPar_AIGBACC;
double d_modelPar_AIGBACC_dX;
bool modelPar_given_AIGBACC;
double modelPar_BIGBACC;
double d_modelPar_BIGBACC_dX;
bool modelPar_given_BIGBACC;
double modelPar_CIGBACC;
double d_modelPar_CIGBACC_dX;
bool modelPar_given_CIGBACC;
double modelPar_NIGBACC;
double d_modelPar_NIGBACC_dX;
bool modelPar_given_NIGBACC;
double modelPar_AIGBINV;
double d_modelPar_AIGBINV_dX;
bool modelPar_given_AIGBINV;
double modelPar_BIGBINV;
double d_modelPar_BIGBINV_dX;
bool modelPar_given_BIGBINV;
double modelPar_CIGBINV;
double d_modelPar_CIGBINV_dX;
bool modelPar_given_CIGBINV;
double modelPar_EIGBINV;
double d_modelPar_EIGBINV_dX;
bool modelPar_given_EIGBINV;
double modelPar_NIGBINV;
double d_modelPar_NIGBINV_dX;
bool modelPar_given_NIGBINV;
double modelPar_AIGC;
double d_modelPar_AIGC_dX;
bool modelPar_given_AIGC;
double modelPar_BIGC;
double d_modelPar_BIGC_dX;
bool modelPar_given_BIGC;
double modelPar_CIGC;
double d_modelPar_CIGC_dX;
bool modelPar_given_CIGC;
double modelPar_AIGS;
double d_modelPar_AIGS_dX;
bool modelPar_given_AIGS;
double modelPar_BIGS;
double d_modelPar_BIGS_dX;
bool modelPar_given_BIGS;
double modelPar_CIGS;
double d_modelPar_CIGS_dX;
bool modelPar_given_CIGS;
double modelPar_AIGD;
double d_modelPar_AIGD_dX;
bool modelPar_given_AIGD;
double modelPar_BIGD;
double d_modelPar_BIGD_dX;
bool modelPar_given_BIGD;
double modelPar_CIGD;
double d_modelPar_CIGD_dX;
bool modelPar_given_CIGD;
double modelPar_DLCIG;
double d_modelPar_DLCIG_dX;
bool modelPar_given_DLCIG;
double modelPar_DLCIGD;
double d_modelPar_DLCIGD_dX;
bool modelPar_given_DLCIGD;
double modelPar_POXEDGE;
double d_modelPar_POXEDGE_dX;
bool modelPar_given_POXEDGE;
double modelPar_NTOX;
double d_modelPar_NTOX_dX;
bool modelPar_given_NTOX;
double modelPar_TOXREF;
double d_modelPar_TOXREF_dX;
bool modelPar_given_TOXREF;
double modelPar_PIGCD;
double d_modelPar_PIGCD_dX;
bool modelPar_given_PIGCD;
double modelPar_AIGCL;
double d_modelPar_AIGCL_dX;
bool modelPar_given_AIGCL;
double modelPar_AIGCW;
double d_modelPar_AIGCW_dX;
bool modelPar_given_AIGCW;
double modelPar_AIGSL;
double d_modelPar_AIGSL_dX;
bool modelPar_given_AIGSL;
double modelPar_AIGSW;
double d_modelPar_AIGSW_dX;
bool modelPar_given_AIGSW;
double modelPar_AIGDL;
double d_modelPar_AIGDL_dX;
bool modelPar_given_AIGDL;
double modelPar_AIGDW;
double d_modelPar_AIGDW_dX;
bool modelPar_given_AIGDW;
double modelPar_PIGCDL;
double d_modelPar_PIGCDL_dX;
bool modelPar_given_PIGCDL;
double modelPar_LAIGBINV;
double d_modelPar_LAIGBINV_dX;
bool modelPar_given_LAIGBINV;
double modelPar_WAIGBINV;
double d_modelPar_WAIGBINV_dX;
bool modelPar_given_WAIGBINV;
double modelPar_PAIGBINV;
double d_modelPar_PAIGBINV_dX;
bool modelPar_given_PAIGBINV;
double modelPar_LBIGBINV;
double d_modelPar_LBIGBINV_dX;
bool modelPar_given_LBIGBINV;
double modelPar_WBIGBINV;
double d_modelPar_WBIGBINV_dX;
bool modelPar_given_WBIGBINV;
double modelPar_PBIGBINV;
double d_modelPar_PBIGBINV_dX;
bool modelPar_given_PBIGBINV;
double modelPar_LCIGBINV;
double d_modelPar_LCIGBINV_dX;
bool modelPar_given_LCIGBINV;
double modelPar_WCIGBINV;
double d_modelPar_WCIGBINV_dX;
bool modelPar_given_WCIGBINV;
double modelPar_PCIGBINV;
double d_modelPar_PCIGBINV_dX;
bool modelPar_given_PCIGBINV;
double modelPar_LEIGBINV;
double d_modelPar_LEIGBINV_dX;
bool modelPar_given_LEIGBINV;
double modelPar_WEIGBINV;
double d_modelPar_WEIGBINV_dX;
bool modelPar_given_WEIGBINV;
double modelPar_PEIGBINV;
double d_modelPar_PEIGBINV_dX;
bool modelPar_given_PEIGBINV;
double modelPar_LNIGBINV;
double d_modelPar_LNIGBINV_dX;
bool modelPar_given_LNIGBINV;
double modelPar_WNIGBINV;
double d_modelPar_WNIGBINV_dX;
bool modelPar_given_WNIGBINV;
double modelPar_PNIGBINV;
double d_modelPar_PNIGBINV_dX;
bool modelPar_given_PNIGBINV;
double modelPar_LAIGBACC;
double d_modelPar_LAIGBACC_dX;
bool modelPar_given_LAIGBACC;
double modelPar_WAIGBACC;
double d_modelPar_WAIGBACC_dX;
bool modelPar_given_WAIGBACC;
double modelPar_PAIGBACC;
double d_modelPar_PAIGBACC_dX;
bool modelPar_given_PAIGBACC;
double modelPar_LBIGBACC;
double d_modelPar_LBIGBACC_dX;
bool modelPar_given_LBIGBACC;
double modelPar_WBIGBACC;
double d_modelPar_WBIGBACC_dX;
bool modelPar_given_WBIGBACC;
double modelPar_PBIGBACC;
double d_modelPar_PBIGBACC_dX;
bool modelPar_given_PBIGBACC;
double modelPar_LCIGBACC;
double d_modelPar_LCIGBACC_dX;
bool modelPar_given_LCIGBACC;
double modelPar_WCIGBACC;
double d_modelPar_WCIGBACC_dX;
bool modelPar_given_WCIGBACC;
double modelPar_PCIGBACC;
double d_modelPar_PCIGBACC_dX;
bool modelPar_given_PCIGBACC;
double modelPar_LNIGBACC;
double d_modelPar_LNIGBACC_dX;
bool modelPar_given_LNIGBACC;
double modelPar_WNIGBACC;
double d_modelPar_WNIGBACC_dX;
bool modelPar_given_WNIGBACC;
double modelPar_PNIGBACC;
double d_modelPar_PNIGBACC_dX;
bool modelPar_given_PNIGBACC;
double modelPar_LAIGC;
double d_modelPar_LAIGC_dX;
bool modelPar_given_LAIGC;
double modelPar_WAIGC;
double d_modelPar_WAIGC_dX;
bool modelPar_given_WAIGC;
double modelPar_PAIGC;
double d_modelPar_PAIGC_dX;
bool modelPar_given_PAIGC;
double modelPar_LBIGC;
double d_modelPar_LBIGC_dX;
bool modelPar_given_LBIGC;
double modelPar_WBIGC;
double d_modelPar_WBIGC_dX;
bool modelPar_given_WBIGC;
double modelPar_PBIGC;
double d_modelPar_PBIGC_dX;
bool modelPar_given_PBIGC;
double modelPar_LCIGC;
double d_modelPar_LCIGC_dX;
bool modelPar_given_LCIGC;
double modelPar_WCIGC;
double d_modelPar_WCIGC_dX;
bool modelPar_given_WCIGC;
double modelPar_PCIGC;
double d_modelPar_PCIGC_dX;
bool modelPar_given_PCIGC;
double modelPar_LAIGS;
double d_modelPar_LAIGS_dX;
bool modelPar_given_LAIGS;
double modelPar_WAIGS;
double d_modelPar_WAIGS_dX;
bool modelPar_given_WAIGS;
double modelPar_PAIGS;
double d_modelPar_PAIGS_dX;
bool modelPar_given_PAIGS;
double modelPar_LBIGS;
double d_modelPar_LBIGS_dX;
bool modelPar_given_LBIGS;
double modelPar_WBIGS;
double d_modelPar_WBIGS_dX;
bool modelPar_given_WBIGS;
double modelPar_PBIGS;
double d_modelPar_PBIGS_dX;
bool modelPar_given_PBIGS;
double modelPar_LCIGS;
double d_modelPar_LCIGS_dX;
bool modelPar_given_LCIGS;
double modelPar_WCIGS;
double d_modelPar_WCIGS_dX;
bool modelPar_given_WCIGS;
double modelPar_PCIGS;
double d_modelPar_PCIGS_dX;
bool modelPar_given_PCIGS;
double modelPar_LAIGD;
double d_modelPar_LAIGD_dX;
bool modelPar_given_LAIGD;
double modelPar_WAIGD;
double d_modelPar_WAIGD_dX;
bool modelPar_given_WAIGD;
double modelPar_PAIGD;
double d_modelPar_PAIGD_dX;
bool modelPar_given_PAIGD;
double modelPar_LBIGD;
double d_modelPar_LBIGD_dX;
bool modelPar_given_LBIGD;
double modelPar_WBIGD;
double d_modelPar_WBIGD_dX;
bool modelPar_given_WBIGD;
double modelPar_PBIGD;
double d_modelPar_PBIGD_dX;
bool modelPar_given_PBIGD;
double modelPar_LCIGD;
double d_modelPar_LCIGD_dX;
bool modelPar_given_LCIGD;
double modelPar_WCIGD;
double d_modelPar_WCIGD_dX;
bool modelPar_given_WCIGD;
double modelPar_PCIGD;
double d_modelPar_PCIGD_dX;
bool modelPar_given_PCIGD;
double modelPar_LPOXEDGE;
double d_modelPar_LPOXEDGE_dX;
bool modelPar_given_LPOXEDGE;
double modelPar_WPOXEDGE;
double d_modelPar_WPOXEDGE_dX;
bool modelPar_given_WPOXEDGE;
double modelPar_PPOXEDGE;
double d_modelPar_PPOXEDGE_dX;
bool modelPar_given_PPOXEDGE;
double modelPar_LDLCIG;
double d_modelPar_LDLCIG_dX;
bool modelPar_given_LDLCIG;
double modelPar_WDLCIG;
double d_modelPar_WDLCIG_dX;
bool modelPar_given_WDLCIG;
double modelPar_PDLCIG;
double d_modelPar_PDLCIG_dX;
bool modelPar_given_PDLCIG;
double modelPar_LDLCIGD;
double d_modelPar_LDLCIGD_dX;
bool modelPar_given_LDLCIGD;
double modelPar_WDLCIGD;
double d_modelPar_WDLCIGD_dX;
bool modelPar_given_WDLCIGD;
double modelPar_PDLCIGD;
double d_modelPar_PDLCIGD_dX;
bool modelPar_given_PDLCIGD;
double modelPar_LNTOX;
double d_modelPar_LNTOX_dX;
bool modelPar_given_LNTOX;
double modelPar_WNTOX;
double d_modelPar_WNTOX_dX;
bool modelPar_given_WNTOX;
double modelPar_PNTOX;
double d_modelPar_PNTOX_dX;
bool modelPar_given_PNTOX;
double modelPar_AGIDL;
double d_modelPar_AGIDL_dX;
bool modelPar_given_AGIDL;
double modelPar_AGIDLL;
double d_modelPar_AGIDLL_dX;
bool modelPar_given_AGIDLL;
double modelPar_AGIDLW;
double d_modelPar_AGIDLW_dX;
bool modelPar_given_AGIDLW;
double modelPar_LAGIDL;
double d_modelPar_LAGIDL_dX;
bool modelPar_given_LAGIDL;
double modelPar_WAGIDL;
double d_modelPar_WAGIDL_dX;
bool modelPar_given_WAGIDL;
double modelPar_PAGIDL;
double d_modelPar_PAGIDL_dX;
bool modelPar_given_PAGIDL;
double modelPar_BGIDL;
double d_modelPar_BGIDL_dX;
bool modelPar_given_BGIDL;
double modelPar_LBGIDL;
double d_modelPar_LBGIDL_dX;
bool modelPar_given_LBGIDL;
double modelPar_WBGIDL;
double d_modelPar_WBGIDL_dX;
bool modelPar_given_WBGIDL;
double modelPar_PBGIDL;
double d_modelPar_PBGIDL_dX;
bool modelPar_given_PBGIDL;
double modelPar_CGIDL;
double d_modelPar_CGIDL_dX;
bool modelPar_given_CGIDL;
double modelPar_LCGIDL;
double d_modelPar_LCGIDL_dX;
bool modelPar_given_LCGIDL;
double modelPar_WCGIDL;
double d_modelPar_WCGIDL_dX;
bool modelPar_given_WCGIDL;
double modelPar_PCGIDL;
double d_modelPar_PCGIDL_dX;
bool modelPar_given_PCGIDL;
double modelPar_EGIDL;
double d_modelPar_EGIDL_dX;
bool modelPar_given_EGIDL;
double modelPar_LEGIDL;
double d_modelPar_LEGIDL_dX;
bool modelPar_given_LEGIDL;
double modelPar_WEGIDL;
double d_modelPar_WEGIDL_dX;
bool modelPar_given_WEGIDL;
double modelPar_PEGIDL;
double d_modelPar_PEGIDL_dX;
bool modelPar_given_PEGIDL;
double modelPar_AGISL;
double d_modelPar_AGISL_dX;
bool modelPar_given_AGISL;
double modelPar_AGISLL;
double d_modelPar_AGISLL_dX;
bool modelPar_given_AGISLL;
double modelPar_AGISLW;
double d_modelPar_AGISLW_dX;
bool modelPar_given_AGISLW;
double modelPar_LAGISL;
double d_modelPar_LAGISL_dX;
bool modelPar_given_LAGISL;
double modelPar_WAGISL;
double d_modelPar_WAGISL_dX;
bool modelPar_given_WAGISL;
double modelPar_PAGISL;
double d_modelPar_PAGISL_dX;
bool modelPar_given_PAGISL;
double modelPar_BGISL;
double d_modelPar_BGISL_dX;
bool modelPar_given_BGISL;
double modelPar_LBGISL;
double d_modelPar_LBGISL_dX;
bool modelPar_given_LBGISL;
double modelPar_WBGISL;
double d_modelPar_WBGISL_dX;
bool modelPar_given_WBGISL;
double modelPar_PBGISL;
double d_modelPar_PBGISL_dX;
bool modelPar_given_PBGISL;
double modelPar_CGISL;
double d_modelPar_CGISL_dX;
bool modelPar_given_CGISL;
double modelPar_LCGISL;
double d_modelPar_LCGISL_dX;
bool modelPar_given_LCGISL;
double modelPar_WCGISL;
double d_modelPar_WCGISL_dX;
bool modelPar_given_WCGISL;
double modelPar_PCGISL;
double d_modelPar_PCGISL_dX;
bool modelPar_given_PCGISL;
double modelPar_EGISL;
double d_modelPar_EGISL_dX;
bool modelPar_given_EGISL;
double modelPar_LEGISL;
double d_modelPar_LEGISL_dX;
bool modelPar_given_LEGISL;
double modelPar_WEGISL;
double d_modelPar_WEGISL_dX;
bool modelPar_given_WEGISL;
double modelPar_PEGISL;
double d_modelPar_PEGISL_dX;
bool modelPar_given_PEGISL;
double modelPar_CF;
double d_modelPar_CF_dX;
bool modelPar_given_CF;
double modelPar_LCF;
double d_modelPar_LCF_dX;
bool modelPar_given_LCF;
double modelPar_WCF;
double d_modelPar_WCF_dX;
bool modelPar_given_WCF;
double modelPar_PCF;
double d_modelPar_PCF_dX;
bool modelPar_given_PCF;
double modelPar_CFRCOEFF;
double d_modelPar_CFRCOEFF_dX;
bool modelPar_given_CFRCOEFF;
double modelPar_CGSO;
double d_modelPar_CGSO_dX;
bool modelPar_given_CGSO;
double modelPar_CGDO;
double d_modelPar_CGDO_dX;
bool modelPar_given_CGDO;
double modelPar_CGBO;
double d_modelPar_CGBO_dX;
bool modelPar_given_CGBO;
double modelPar_CGSL;
double d_modelPar_CGSL_dX;
bool modelPar_given_CGSL;
double modelPar_LCGSL;
double d_modelPar_LCGSL_dX;
bool modelPar_given_LCGSL;
double modelPar_WCGSL;
double d_modelPar_WCGSL_dX;
bool modelPar_given_WCGSL;
double modelPar_PCGSL;
double d_modelPar_PCGSL_dX;
bool modelPar_given_PCGSL;
double modelPar_CGDL;
double d_modelPar_CGDL_dX;
bool modelPar_given_CGDL;
double modelPar_LCGDL;
double d_modelPar_LCGDL_dX;
bool modelPar_given_LCGDL;
double modelPar_WCGDL;
double d_modelPar_WCGDL_dX;
bool modelPar_given_WCGDL;
double modelPar_PCGDL;
double d_modelPar_PCGDL_dX;
bool modelPar_given_PCGDL;
double modelPar_CKAPPAS;
double d_modelPar_CKAPPAS_dX;
bool modelPar_given_CKAPPAS;
double modelPar_LCKAPPAS;
double d_modelPar_LCKAPPAS_dX;
bool modelPar_given_LCKAPPAS;
double modelPar_WCKAPPAS;
double d_modelPar_WCKAPPAS_dX;
bool modelPar_given_WCKAPPAS;
double modelPar_PCKAPPAS;
double d_modelPar_PCKAPPAS_dX;
bool modelPar_given_PCKAPPAS;
double modelPar_CKAPPAD;
double d_modelPar_CKAPPAD_dX;
bool modelPar_given_CKAPPAD;
double modelPar_LCKAPPAD;
double d_modelPar_LCKAPPAD_dX;
bool modelPar_given_LCKAPPAD;
double modelPar_WCKAPPAD;
double d_modelPar_WCKAPPAD_dX;
bool modelPar_given_WCKAPPAD;
double modelPar_PCKAPPAD;
double d_modelPar_PCKAPPAD_dX;
bool modelPar_given_PCKAPPAD;
double modelPar_DMCG;
double d_modelPar_DMCG_dX;
bool modelPar_given_DMCG;
double modelPar_DMCI;
double d_modelPar_DMCI_dX;
bool modelPar_given_DMCI;
double modelPar_DMDG;
double d_modelPar_DMDG_dX;
bool modelPar_given_DMDG;
double modelPar_DMCGT;
double d_modelPar_DMCGT_dX;
bool modelPar_given_DMCGT;
double modelPar_XGL;
double d_modelPar_XGL_dX;
bool modelPar_given_XGL;
double modelPar_RSHG;
double d_modelPar_RSHG_dX;
bool modelPar_given_RSHG;
double modelPar_CJS;
double d_modelPar_CJS_dX;
bool modelPar_given_CJS;
double modelPar_CJD;
double d_modelPar_CJD_dX;
bool modelPar_given_CJD;
double modelPar_CJSWS;
double d_modelPar_CJSWS_dX;
bool modelPar_given_CJSWS;
double modelPar_CJSWD;
double d_modelPar_CJSWD_dX;
bool modelPar_given_CJSWD;
double modelPar_CJSWGS;
double d_modelPar_CJSWGS_dX;
bool modelPar_given_CJSWGS;
double modelPar_CJSWGD;
double d_modelPar_CJSWGD_dX;
bool modelPar_given_CJSWGD;
double modelPar_PBS;
double d_modelPar_PBS_dX;
bool modelPar_given_PBS;
double modelPar_PBD;
double d_modelPar_PBD_dX;
bool modelPar_given_PBD;
double modelPar_PBSWS;
double d_modelPar_PBSWS_dX;
bool modelPar_given_PBSWS;
double modelPar_PBSWD;
double d_modelPar_PBSWD_dX;
bool modelPar_given_PBSWD;
double modelPar_PBSWGS;
double d_modelPar_PBSWGS_dX;
bool modelPar_given_PBSWGS;
double modelPar_PBSWGD;
double d_modelPar_PBSWGD_dX;
bool modelPar_given_PBSWGD;
double modelPar_MJS;
double d_modelPar_MJS_dX;
bool modelPar_given_MJS;
double modelPar_MJD;
double d_modelPar_MJD_dX;
bool modelPar_given_MJD;
double modelPar_MJSWS;
double d_modelPar_MJSWS_dX;
bool modelPar_given_MJSWS;
double modelPar_MJSWD;
double d_modelPar_MJSWD_dX;
bool modelPar_given_MJSWD;
double modelPar_MJSWGS;
double d_modelPar_MJSWGS_dX;
bool modelPar_given_MJSWGS;
double modelPar_MJSWGD;
double d_modelPar_MJSWGD_dX;
bool modelPar_given_MJSWGD;
double modelPar_JSS;
double d_modelPar_JSS_dX;
bool modelPar_given_JSS;
double modelPar_JSD;
double d_modelPar_JSD_dX;
bool modelPar_given_JSD;
double modelPar_JSWS;
double d_modelPar_JSWS_dX;
bool modelPar_given_JSWS;
double modelPar_JSWD;
double d_modelPar_JSWD_dX;
bool modelPar_given_JSWD;
double modelPar_JSWGS;
double d_modelPar_JSWGS_dX;
bool modelPar_given_JSWGS;
double modelPar_JSWGD;
double d_modelPar_JSWGD_dX;
bool modelPar_given_JSWGD;
double modelPar_NJS;
double d_modelPar_NJS_dX;
bool modelPar_given_NJS;
double modelPar_NJD;
double d_modelPar_NJD_dX;
bool modelPar_given_NJD;
double modelPar_IJTHSFWD;
double d_modelPar_IJTHSFWD_dX;
bool modelPar_given_IJTHSFWD;
double modelPar_IJTHDFWD;
double d_modelPar_IJTHDFWD_dX;
bool modelPar_given_IJTHDFWD;
double modelPar_IJTHSREV;
double d_modelPar_IJTHSREV_dX;
bool modelPar_given_IJTHSREV;
double modelPar_IJTHDREV;
double d_modelPar_IJTHDREV_dX;
bool modelPar_given_IJTHDREV;
double modelPar_BVS;
double d_modelPar_BVS_dX;
bool modelPar_given_BVS;
double modelPar_BVD;
double d_modelPar_BVD_dX;
bool modelPar_given_BVD;
double modelPar_XJBVS;
double d_modelPar_XJBVS_dX;
bool modelPar_given_XJBVS;
double modelPar_XJBVD;
double d_modelPar_XJBVD_dX;
bool modelPar_given_XJBVD;
double modelPar_JTSS;
double d_modelPar_JTSS_dX;
bool modelPar_given_JTSS;
double modelPar_JTSD;
double d_modelPar_JTSD_dX;
bool modelPar_given_JTSD;
double modelPar_JTSSWS;
double d_modelPar_JTSSWS_dX;
bool modelPar_given_JTSSWS;
double modelPar_JTSSWD;
double d_modelPar_JTSSWD_dX;
bool modelPar_given_JTSSWD;
double modelPar_JTSSWGS;
double d_modelPar_JTSSWGS_dX;
bool modelPar_given_JTSSWGS;
double modelPar_JTSSWGD;
double d_modelPar_JTSSWGD_dX;
bool modelPar_given_JTSSWGD;
double modelPar_JTWEFF;
double d_modelPar_JTWEFF_dX;
bool modelPar_given_JTWEFF;
double modelPar_NJTS;
double d_modelPar_NJTS_dX;
bool modelPar_given_NJTS;
double modelPar_NJTSD;
double d_modelPar_NJTSD_dX;
bool modelPar_given_NJTSD;
double modelPar_NJTSSW;
double d_modelPar_NJTSSW_dX;
bool modelPar_given_NJTSSW;
double modelPar_NJTSSWD;
double d_modelPar_NJTSSWD_dX;
bool modelPar_given_NJTSSWD;
double modelPar_NJTSSWG;
double d_modelPar_NJTSSWG_dX;
bool modelPar_given_NJTSSWG;
double modelPar_NJTSSWGD;
double d_modelPar_NJTSSWGD_dX;
bool modelPar_given_NJTSSWGD;
double modelPar_VTSS;
double d_modelPar_VTSS_dX;
bool modelPar_given_VTSS;
double modelPar_VTSD;
double d_modelPar_VTSD_dX;
bool modelPar_given_VTSD;
double modelPar_VTSSWS;
double d_modelPar_VTSSWS_dX;
bool modelPar_given_VTSSWS;
double modelPar_VTSSWD;
double d_modelPar_VTSSWD_dX;
bool modelPar_given_VTSSWD;
double modelPar_VTSSWGS;
double d_modelPar_VTSSWGS_dX;
bool modelPar_given_VTSSWGS;
double modelPar_VTSSWGD;
double d_modelPar_VTSSWGD_dX;
bool modelPar_given_VTSSWGD;
double modelPar_XRCRG1;
double d_modelPar_XRCRG1_dX;
bool modelPar_given_XRCRG1;
double modelPar_XRCRG2;
double d_modelPar_XRCRG2_dX;
bool modelPar_given_XRCRG2;
double modelPar_GBMIN;
double d_modelPar_GBMIN_dX;
bool modelPar_given_GBMIN;
double modelPar_RBPS0;
double d_modelPar_RBPS0_dX;
bool modelPar_given_RBPS0;
double modelPar_RBPSL;
double d_modelPar_RBPSL_dX;
bool modelPar_given_RBPSL;
double modelPar_RBPSW;
double d_modelPar_RBPSW_dX;
bool modelPar_given_RBPSW;
double modelPar_RBPSNF;
double d_modelPar_RBPSNF_dX;
bool modelPar_given_RBPSNF;
double modelPar_RBPD0;
double d_modelPar_RBPD0_dX;
bool modelPar_given_RBPD0;
double modelPar_RBPDL;
double d_modelPar_RBPDL_dX;
bool modelPar_given_RBPDL;
double modelPar_RBPDW;
double d_modelPar_RBPDW_dX;
bool modelPar_given_RBPDW;
double modelPar_RBPDNF;
double d_modelPar_RBPDNF_dX;
bool modelPar_given_RBPDNF;
double modelPar_RBPBX0;
double d_modelPar_RBPBX0_dX;
bool modelPar_given_RBPBX0;
double modelPar_RBPBXL;
double d_modelPar_RBPBXL_dX;
bool modelPar_given_RBPBXL;
double modelPar_RBPBXW;
double d_modelPar_RBPBXW_dX;
bool modelPar_given_RBPBXW;
double modelPar_RBPBXNF;
double d_modelPar_RBPBXNF_dX;
bool modelPar_given_RBPBXNF;
double modelPar_RBPBY0;
double d_modelPar_RBPBY0_dX;
bool modelPar_given_RBPBY0;
double modelPar_RBPBYL;
double d_modelPar_RBPBYL_dX;
bool modelPar_given_RBPBYL;
double modelPar_RBPBYW;
double d_modelPar_RBPBYW_dX;
bool modelPar_given_RBPBYW;
double modelPar_RBPBYNF;
double d_modelPar_RBPBYNF_dX;
bool modelPar_given_RBPBYNF;
double modelPar_RBSBX0;
double d_modelPar_RBSBX0_dX;
bool modelPar_given_RBSBX0;
double modelPar_RBSBY0;
double d_modelPar_RBSBY0_dX;
bool modelPar_given_RBSBY0;
double modelPar_RBDBX0;
double d_modelPar_RBDBX0_dX;
bool modelPar_given_RBDBX0;
double modelPar_RBDBY0;
double d_modelPar_RBDBY0_dX;
bool modelPar_given_RBDBY0;
double modelPar_RBSDBXL;
double d_modelPar_RBSDBXL_dX;
bool modelPar_given_RBSDBXL;
double modelPar_RBSDBXW;
double d_modelPar_RBSDBXW_dX;
bool modelPar_given_RBSDBXW;
double modelPar_RBSDBXNF;
double d_modelPar_RBSDBXNF_dX;
bool modelPar_given_RBSDBXNF;
double modelPar_RBSDBYL;
double d_modelPar_RBSDBYL_dX;
bool modelPar_given_RBSDBYL;
double modelPar_RBSDBYW;
double d_modelPar_RBSDBYW_dX;
bool modelPar_given_RBSDBYW;
double modelPar_RBSDBYNF;
double d_modelPar_RBSDBYNF_dX;
bool modelPar_given_RBSDBYNF;
double modelPar_EF;
double d_modelPar_EF_dX;
bool modelPar_given_EF;
double modelPar_EM;
double d_modelPar_EM_dX;
bool modelPar_given_EM;
double modelPar_NOIA;
double d_modelPar_NOIA_dX;
bool modelPar_given_NOIA;
double modelPar_NOIB;
double d_modelPar_NOIB_dX;
bool modelPar_given_NOIB;
double modelPar_NOIC;
double d_modelPar_NOIC_dX;
bool modelPar_given_NOIC;
double modelPar_LINTNOI;
double d_modelPar_LINTNOI_dX;
bool modelPar_given_LINTNOI;
double modelPar_NTNOI;
double d_modelPar_NTNOI_dX;
bool modelPar_given_NTNOI;
double modelPar_RNOIA;
double d_modelPar_RNOIA_dX;
bool modelPar_given_RNOIA;
double modelPar_RNOIB;
double d_modelPar_RNOIB_dX;
bool modelPar_given_RNOIB;
double modelPar_RNOIC;
double d_modelPar_RNOIC_dX;
bool modelPar_given_RNOIC;
double modelPar_TNOIA;
double d_modelPar_TNOIA_dX;
bool modelPar_given_TNOIA;
double modelPar_TNOIB;
double d_modelPar_TNOIB_dX;
bool modelPar_given_TNOIB;
double modelPar_TNOIC;
double d_modelPar_TNOIC_dX;
bool modelPar_given_TNOIC;
double modelPar_DLBIN;
double d_modelPar_DLBIN_dX;
bool modelPar_given_DLBIN;
double modelPar_DWBIN;
double d_modelPar_DWBIN_dX;
bool modelPar_given_DWBIN;
double modelPar_TNOM;
double d_modelPar_TNOM_dX;
bool modelPar_given_TNOM;
double modelPar_DTEMP;
double d_modelPar_DTEMP_dX;
bool modelPar_given_DTEMP;
double modelPar_TBGASUB;
double d_modelPar_TBGASUB_dX;
bool modelPar_given_TBGASUB;
double modelPar_TBGBSUB;
double d_modelPar_TBGBSUB_dX;
bool modelPar_given_TBGBSUB;
double modelPar_TNFACTOR;
double d_modelPar_TNFACTOR_dX;
bool modelPar_given_TNFACTOR;
double modelPar_UTE;
double d_modelPar_UTE_dX;
bool modelPar_given_UTE;
double modelPar_LUTE;
double d_modelPar_LUTE_dX;
bool modelPar_given_LUTE;
double modelPar_WUTE;
double d_modelPar_WUTE_dX;
bool modelPar_given_WUTE;
double modelPar_PUTE;
double d_modelPar_PUTE_dX;
bool modelPar_given_PUTE;
double modelPar_UTEL;
double d_modelPar_UTEL_dX;
bool modelPar_given_UTEL;
double modelPar_UA1;
double d_modelPar_UA1_dX;
bool modelPar_given_UA1;
double modelPar_LUA1;
double d_modelPar_LUA1_dX;
bool modelPar_given_LUA1;
double modelPar_WUA1;
double d_modelPar_WUA1_dX;
bool modelPar_given_WUA1;
double modelPar_PUA1;
double d_modelPar_PUA1_dX;
bool modelPar_given_PUA1;
double modelPar_UA1L;
double d_modelPar_UA1L_dX;
bool modelPar_given_UA1L;
double modelPar_UC1;
double d_modelPar_UC1_dX;
bool modelPar_given_UC1;
double modelPar_LUC1;
double d_modelPar_LUC1_dX;
bool modelPar_given_LUC1;
double modelPar_WUC1;
double d_modelPar_WUC1_dX;
bool modelPar_given_WUC1;
double modelPar_PUC1;
double d_modelPar_PUC1_dX;
bool modelPar_given_PUC1;
double modelPar_UD1;
double d_modelPar_UD1_dX;
bool modelPar_given_UD1;
double modelPar_LUD1;
double d_modelPar_LUD1_dX;
bool modelPar_given_LUD1;
double modelPar_WUD1;
double d_modelPar_WUD1_dX;
bool modelPar_given_WUD1;
double modelPar_PUD1;
double d_modelPar_PUD1_dX;
bool modelPar_given_PUD1;
double modelPar_UD1L;
double d_modelPar_UD1L_dX;
bool modelPar_given_UD1L;
double modelPar_UCSTE;
double d_modelPar_UCSTE_dX;
bool modelPar_given_UCSTE;
double modelPar_LUCSTE;
double d_modelPar_LUCSTE_dX;
bool modelPar_given_LUCSTE;
double modelPar_WUCSTE;
double d_modelPar_WUCSTE_dX;
bool modelPar_given_WUCSTE;
double modelPar_PUCSTE;
double d_modelPar_PUCSTE_dX;
bool modelPar_given_PUCSTE;
double modelPar_TETA0;
double d_modelPar_TETA0_dX;
bool modelPar_given_TETA0;
double modelPar_PRT;
double d_modelPar_PRT_dX;
bool modelPar_given_PRT;
double modelPar_LPRT;
double d_modelPar_LPRT_dX;
bool modelPar_given_LPRT;
double modelPar_WPRT;
double d_modelPar_WPRT_dX;
bool modelPar_given_WPRT;
double modelPar_PPRT;
double d_modelPar_PPRT_dX;
bool modelPar_given_PPRT;
double modelPar_AT;
double d_modelPar_AT_dX;
bool modelPar_given_AT;
double modelPar_LAT;
double d_modelPar_LAT_dX;
bool modelPar_given_LAT;
double modelPar_WAT;
double d_modelPar_WAT_dX;
bool modelPar_given_WAT;
double modelPar_PAT;
double d_modelPar_PAT_dX;
bool modelPar_given_PAT;
double modelPar_ATL;
double d_modelPar_ATL_dX;
bool modelPar_given_ATL;
double modelPar_TDELTA;
double d_modelPar_TDELTA_dX;
bool modelPar_given_TDELTA;
double modelPar_PTWGT;
double d_modelPar_PTWGT_dX;
bool modelPar_given_PTWGT;
double modelPar_LPTWGT;
double d_modelPar_LPTWGT_dX;
bool modelPar_given_LPTWGT;
double modelPar_WPTWGT;
double d_modelPar_WPTWGT_dX;
bool modelPar_given_WPTWGT;
double modelPar_PPTWGT;
double d_modelPar_PPTWGT_dX;
bool modelPar_given_PPTWGT;
double modelPar_PTWGTL;
double d_modelPar_PTWGTL_dX;
bool modelPar_given_PTWGTL;
double modelPar_KT1;
double d_modelPar_KT1_dX;
bool modelPar_given_KT1;
double modelPar_KT1EXP;
double d_modelPar_KT1EXP_dX;
bool modelPar_given_KT1EXP;
double modelPar_KT1L;
double d_modelPar_KT1L_dX;
bool modelPar_given_KT1L;
double modelPar_LKT1;
double d_modelPar_LKT1_dX;
bool modelPar_given_LKT1;
double modelPar_WKT1;
double d_modelPar_WKT1_dX;
bool modelPar_given_WKT1;
double modelPar_PKT1;
double d_modelPar_PKT1_dX;
bool modelPar_given_PKT1;
double modelPar_KT2;
double d_modelPar_KT2_dX;
bool modelPar_given_KT2;
double modelPar_LKT2;
double d_modelPar_LKT2_dX;
bool modelPar_given_LKT2;
double modelPar_WKT2;
double d_modelPar_WKT2_dX;
bool modelPar_given_WKT2;
double modelPar_PKT2;
double d_modelPar_PKT2_dX;
bool modelPar_given_PKT2;
double modelPar_IIT;
double d_modelPar_IIT_dX;
bool modelPar_given_IIT;
double modelPar_LIIT;
double d_modelPar_LIIT_dX;
bool modelPar_given_LIIT;
double modelPar_WIIT;
double d_modelPar_WIIT_dX;
bool modelPar_given_WIIT;
double modelPar_PIIT;
double d_modelPar_PIIT_dX;
bool modelPar_given_PIIT;
double modelPar_IGT;
double d_modelPar_IGT_dX;
bool modelPar_given_IGT;
double modelPar_LIGT;
double d_modelPar_LIGT_dX;
bool modelPar_given_LIGT;
double modelPar_WIGT;
double d_modelPar_WIGT_dX;
bool modelPar_given_WIGT;
double modelPar_PIGT;
double d_modelPar_PIGT_dX;
bool modelPar_given_PIGT;
double modelPar_TGIDL;
double d_modelPar_TGIDL_dX;
bool modelPar_given_TGIDL;
double modelPar_LTGIDL;
double d_modelPar_LTGIDL_dX;
bool modelPar_given_LTGIDL;
double modelPar_WTGIDL;
double d_modelPar_WTGIDL_dX;
bool modelPar_given_WTGIDL;
double modelPar_PTGIDL;
double d_modelPar_PTGIDL_dX;
bool modelPar_given_PTGIDL;
double modelPar_TCJ;
double d_modelPar_TCJ_dX;
bool modelPar_given_TCJ;
double modelPar_TCJSW;
double d_modelPar_TCJSW_dX;
bool modelPar_given_TCJSW;
double modelPar_TCJSWG;
double d_modelPar_TCJSWG_dX;
bool modelPar_given_TCJSWG;
double modelPar_TPB;
double d_modelPar_TPB_dX;
bool modelPar_given_TPB;
double modelPar_TPBSW;
double d_modelPar_TPBSW_dX;
bool modelPar_given_TPBSW;
double modelPar_TPBSWG;
double d_modelPar_TPBSWG_dX;
bool modelPar_given_TPBSWG;
double modelPar_XTIS;
double d_modelPar_XTIS_dX;
bool modelPar_given_XTIS;
double modelPar_XTID;
double d_modelPar_XTID_dX;
bool modelPar_given_XTID;
double modelPar_XTSS;
double d_modelPar_XTSS_dX;
bool modelPar_given_XTSS;
double modelPar_XTSD;
double d_modelPar_XTSD_dX;
bool modelPar_given_XTSD;
double modelPar_XTSSWS;
double d_modelPar_XTSSWS_dX;
bool modelPar_given_XTSSWS;
double modelPar_XTSSWD;
double d_modelPar_XTSSWD_dX;
bool modelPar_given_XTSSWD;
double modelPar_XTSSWGS;
double d_modelPar_XTSSWGS_dX;
bool modelPar_given_XTSSWGS;
double modelPar_XTSSWGD;
double d_modelPar_XTSSWGD_dX;
bool modelPar_given_XTSSWGD;
double modelPar_TNJTS;
double d_modelPar_TNJTS_dX;
bool modelPar_given_TNJTS;
double modelPar_TNJTSD;
double d_modelPar_TNJTSD_dX;
bool modelPar_given_TNJTSD;
double modelPar_TNJTSSW;
double d_modelPar_TNJTSSW_dX;
bool modelPar_given_TNJTSSW;
double modelPar_TNJTSSWD;
double d_modelPar_TNJTSSWD_dX;
bool modelPar_given_TNJTSSWD;
double modelPar_TNJTSSWG;
double d_modelPar_TNJTSSWG_dX;
bool modelPar_given_TNJTSSWG;
double modelPar_TNJTSSWGD;
double d_modelPar_TNJTSSWGD_dX;
bool modelPar_given_TNJTSSWGD;
double modelPar_RTH0;
double d_modelPar_RTH0_dX;
bool modelPar_given_RTH0;
double modelPar_CTH0;
double d_modelPar_CTH0_dX;
bool modelPar_given_CTH0;
double modelPar_WTH0;
double d_modelPar_WTH0_dX;
bool modelPar_given_WTH0;
double modelPar_SAREF;
double d_modelPar_SAREF_dX;
bool modelPar_given_SAREF;
double modelPar_SBREF;
double d_modelPar_SBREF_dX;
bool modelPar_given_SBREF;
double modelPar_WLOD;
double d_modelPar_WLOD_dX;
bool modelPar_given_WLOD;
double modelPar_KU0;
double d_modelPar_KU0_dX;
bool modelPar_given_KU0;
double modelPar_KVSAT;
double d_modelPar_KVSAT_dX;
bool modelPar_given_KVSAT;
double modelPar_TKU0;
double d_modelPar_TKU0_dX;
bool modelPar_given_TKU0;
double modelPar_LKU0;
double d_modelPar_LKU0_dX;
bool modelPar_given_LKU0;
double modelPar_WKU0;
double d_modelPar_WKU0_dX;
bool modelPar_given_WKU0;
double modelPar_PKU0;
double d_modelPar_PKU0_dX;
bool modelPar_given_PKU0;
double modelPar_LLODKU0;
double d_modelPar_LLODKU0_dX;
bool modelPar_given_LLODKU0;
double modelPar_WLODKU0;
double d_modelPar_WLODKU0_dX;
bool modelPar_given_WLODKU0;
double modelPar_KVTH0;
double d_modelPar_KVTH0_dX;
bool modelPar_given_KVTH0;
double modelPar_LKVTH0;
double d_modelPar_LKVTH0_dX;
bool modelPar_given_LKVTH0;
double modelPar_WKVTH0;
double d_modelPar_WKVTH0_dX;
bool modelPar_given_WKVTH0;
double modelPar_PKVTH0;
double d_modelPar_PKVTH0_dX;
bool modelPar_given_PKVTH0;
double modelPar_LLODVTH;
double d_modelPar_LLODVTH_dX;
bool modelPar_given_LLODVTH;
double modelPar_WLODVTH;
double d_modelPar_WLODVTH_dX;
bool modelPar_given_WLODVTH;
double modelPar_STK2;
double d_modelPar_STK2_dX;
bool modelPar_given_STK2;
double modelPar_LODK2;
double d_modelPar_LODK2_dX;
bool modelPar_given_LODK2;
double modelPar_STETA0;
double d_modelPar_STETA0_dX;
bool modelPar_given_STETA0;
double modelPar_LODETA0;
double d_modelPar_LODETA0_dX;
bool modelPar_given_LODETA0;
double modelPar_WEB;
double d_modelPar_WEB_dX;
bool modelPar_given_WEB;
double modelPar_WEC;
double d_modelPar_WEC_dX;
bool modelPar_given_WEC;
double modelPar_KVTH0WE;
double d_modelPar_KVTH0WE_dX;
bool modelPar_given_KVTH0WE;
double modelPar_LKVTH0WE;
double d_modelPar_LKVTH0WE_dX;
bool modelPar_given_LKVTH0WE;
double modelPar_WKVTH0WE;
double d_modelPar_WKVTH0WE_dX;
bool modelPar_given_WKVTH0WE;
double modelPar_PKVTH0WE;
double d_modelPar_PKVTH0WE_dX;
bool modelPar_given_PKVTH0WE;
double modelPar_K2WE;
double d_modelPar_K2WE_dX;
bool modelPar_given_K2WE;
double modelPar_LK2WE;
double d_modelPar_LK2WE_dX;
bool modelPar_given_LK2WE;
double modelPar_WK2WE;
double d_modelPar_WK2WE_dX;
bool modelPar_given_WK2WE;
double modelPar_PK2WE;
double d_modelPar_PK2WE_dX;
bool modelPar_given_PK2WE;
double modelPar_KU0WE;
double d_modelPar_KU0WE_dX;
bool modelPar_given_KU0WE;
double modelPar_LKU0WE;
double d_modelPar_LKU0WE_dX;
bool modelPar_given_LKU0WE;
double modelPar_WKU0WE;
double d_modelPar_WKU0WE_dX;
bool modelPar_given_WKU0WE;
double modelPar_PKU0WE;
double d_modelPar_PKU0WE_dX;
bool modelPar_given_PKU0WE;
double modelPar_SCREF;
double d_modelPar_SCREF_dX;
bool modelPar_given_SCREF;
double modelPar_WEDGE;
double d_modelPar_WEDGE_dX;
bool modelPar_given_WEDGE;
double modelPar_DGAMMAEDGE;
double d_modelPar_DGAMMAEDGE_dX;
bool modelPar_given_DGAMMAEDGE;
double modelPar_DGAMMAEDGEL;
double d_modelPar_DGAMMAEDGEL_dX;
bool modelPar_given_DGAMMAEDGEL;
double modelPar_DGAMMAEDGELEXP;
double d_modelPar_DGAMMAEDGELEXP_dX;
bool modelPar_given_DGAMMAEDGELEXP;
double modelPar_DVTEDGE;
double d_modelPar_DVTEDGE_dX;
bool modelPar_given_DVTEDGE;
double modelPar_NFACTOREDGE;
double d_modelPar_NFACTOREDGE_dX;
bool modelPar_given_NFACTOREDGE;
double modelPar_CITEDGE;
double d_modelPar_CITEDGE_dX;
bool modelPar_given_CITEDGE;
double modelPar_CDSCDEDGE;
double d_modelPar_CDSCDEDGE_dX;
bool modelPar_given_CDSCDEDGE;
double modelPar_CDSCBEDGE;
double d_modelPar_CDSCBEDGE_dX;
bool modelPar_given_CDSCBEDGE;
double modelPar_ETA0EDGE;
double d_modelPar_ETA0EDGE_dX;
bool modelPar_given_ETA0EDGE;
double modelPar_ETABEDGE;
double d_modelPar_ETABEDGE_dX;
bool modelPar_given_ETABEDGE;
double modelPar_KT1EDGE;
double d_modelPar_KT1EDGE_dX;
bool modelPar_given_KT1EDGE;
double modelPar_KT1LEDGE;
double d_modelPar_KT1LEDGE_dX;
bool modelPar_given_KT1LEDGE;
double modelPar_KT2EDGE;
double d_modelPar_KT2EDGE_dX;
bool modelPar_given_KT2EDGE;
double modelPar_KT1EXPEDGE;
double d_modelPar_KT1EXPEDGE_dX;
bool modelPar_given_KT1EXPEDGE;
double modelPar_TNFACTOREDGE;
double d_modelPar_TNFACTOREDGE_dX;
bool modelPar_given_TNFACTOREDGE;
double modelPar_TETA0EDGE;
double d_modelPar_TETA0EDGE_dX;
bool modelPar_given_TETA0EDGE;
double modelPar_DVT0EDGE;
double d_modelPar_DVT0EDGE_dX;
bool modelPar_given_DVT0EDGE;
double modelPar_DVT1EDGE;
double d_modelPar_DVT1EDGE_dX;
bool modelPar_given_DVT1EDGE;
double modelPar_DVT2EDGE;
double d_modelPar_DVT2EDGE_dX;
bool modelPar_given_DVT2EDGE;
double modelPar_LMIN;
double d_modelPar_LMIN_dX;
bool modelPar_given_LMIN;
double modelPar_WMIN;
double d_modelPar_WMIN_dX;
bool modelPar_given_WMIN;
double modelPar_LMAX;
double d_modelPar_LMAX_dX;
bool modelPar_given_LMAX;
double modelPar_WMAX;
double d_modelPar_WMAX_dX;
bool modelPar_given_WMAX;
// non-reals (including hidden)
int modelPar_NGCON;
bool modelPar_given_NGCON;
int modelPar_RGATEMOD;
bool modelPar_given_RGATEMOD;
int modelPar_RBODYMOD;
bool modelPar_given_RBODYMOD;
int modelPar_GEOMOD;
bool modelPar_given_GEOMOD;
int modelPar_RGEOMOD;
bool modelPar_given_RGEOMOD;
int modelPar_SCA;
bool modelPar_given_SCA;
int modelPar_SCB;
bool modelPar_given_SCB;
int modelPar_SCC;
bool modelPar_given_SCC;
int modelPar_SC;
bool modelPar_given_SC;
int modelPar_TYPE;
bool modelPar_given_TYPE;
int modelPar_CVMOD;
bool modelPar_given_CVMOD;
int modelPar_COVMOD;
bool modelPar_given_COVMOD;
int modelPar_RDSMOD;
bool modelPar_given_RDSMOD;
int modelPar_WPEMOD;
bool modelPar_given_WPEMOD;
int modelPar_ASYMMOD;
bool modelPar_given_ASYMMOD;
int modelPar_GIDLMOD;
bool modelPar_given_GIDLMOD;
int modelPar_IGCMOD;
bool modelPar_given_IGCMOD;
int modelPar_IGBMOD;
bool modelPar_given_IGBMOD;
int modelPar_TNOIMOD;
bool modelPar_given_TNOIMOD;
int modelPar_SHMOD;
bool modelPar_given_SHMOD;
int modelPar_MOBSCALE;
bool modelPar_given_MOBSCALE;
int modelPar_PERMOD;
bool modelPar_given_PERMOD;
int modelPar_BINUNIT;
bool modelPar_given_BINUNIT;
int modelPar_EDGEFET;
bool modelPar_given_EDGEFET;
};



//-----------------------------------------------------------------------------
// Free functions used by sensitivity
//
//-----------------------------------------------------------------------------
void evaluateModelEquations(
std::vector <double> & probeVars,
// probe constants
const int admsProbeID_V_bi_dbulk,
const int admsProbeID_V_b_dbulk,
const int admsProbeID_V_b_bi,
const int admsProbeID_V_b_sbulk,
const int admsProbeID_V_bi_sbulk,
const int admsProbeID_V_gm_gi,
const int admsProbeID_V_g_gm,
const int admsProbeID_V_s_si,
const int admsProbeID_V_d_di,
const int admsProbeID_V_gi_si,
const int admsProbeID_V_di_si,
const int admsProbeID_V_dbulk_GND,
const int admsProbeID_V_sbulk_GND,
const int admsProbeID_V_gm_GND,
const int admsProbeID_V_gi_GND,
const int admsProbeID_V_bi_GND,
const int admsProbeID_V_di_GND,
const int admsProbeID_V_si_GND,
const int admsProbeID_V_gm_bi,
const int admsProbeID_V_N1_GND,
const int admsProbeID_V_N2_GND,
const int admsProbeID_V_gm_si,
const int admsProbeID_V_gm_di,
const int admsProbeID_V_dbulk_di,
const int admsProbeID_V_sbulk_si,
const int admsProbeID_V_si_bi,
const int admsProbeID_V_di_bi,
const int admsProbeID_V_gi_bi,
const int admsProbeID_Temp_t_GND,
// node constants
const int admsNodeID_d,
const int admsNodeID_g,
const int admsNodeID_s,
const int admsNodeID_b,
const int admsNodeID_t,
const int admsNodeID_di,
const int admsNodeID_si,
const int admsNodeID_gi,
const int admsNodeID_gm,
const int admsNodeID_bi,
const int admsNodeID_sbulk,
const int admsNodeID_dbulk,
const int admsNodeID_N1,
const int admsNodeID_N2,
instanceSensStruct & instanceStruct,
modelSensStruct & modelStruct,
const std::vector<bool> & portsConnected_,
// basic variables
 double admsTemperature, double adms_vt_nom, double ADMSgmin_arg, std::vector <double> & d_staticContributions_dX, std::vector <double> & d_dynamicContributions_dX, const Instance & theInstance);

void evaluateInitialInstance(
instanceSensStruct & instanceStruct,
modelSensStruct & modelStruct,
const int admsNodeID_d,
const int admsNodeID_g,
const int admsNodeID_s,
const int admsNodeID_b,
const int admsNodeID_t,
const int admsNodeID_di,
const int admsNodeID_si,
const int admsNodeID_gi,
const int admsNodeID_gm,
const int admsNodeID_bi,
const int admsNodeID_sbulk,
const int admsNodeID_dbulk,
const int admsNodeID_N1,
const int admsNodeID_N2,
 const std::vector<bool> & portsConnected_,
 double admsTemperature,double adms_vt_nom, double ADMSgmin_arg, const Instance & theInstance);

void evaluateInitialModel(
modelSensStruct & modelStruct,
 double admsTemperature, double ADMSgmin_arg, const Instance & theInstance);

#endif // Xyce_ADMS_SENSITIVITIES


// Limited exponential --- NOT what verilog LRM says, but what qucs,
// ng-spice, and zspice do.

template <typename T>
T limexp(const T &x)
{
  if ((x) < 80.0)
  return (exp(x));
  else
  return (exp(80.0)*(x-79.0));
}


struct Traits: public DeviceTraits<Model, Instance, MOSFET1::Traits>
{
  static const char *name() {return "BSIM6";}
  static const char *deviceTypeName() {return "M level 77";}

  static int numNodes() {return 4;}

  static int numOptionalNodes() {return 1;};

  static bool modelRequired() {return true;}
  static bool isLinearDevice() {return false;}

  static Device *factory(const Configuration &configuration, const FactoryBlock &factory_block);
  static void loadModelParameters(ParametricData<Model> &model_parameters);
  static void loadInstanceParameters(ParametricData<Instance> &instance_parameters);
};

//-----------------------------------------------------------------------------
// Class         : Instance

//
// Purpose       : This class represents a single instance  of the
//                 device.  It mainly contains indices and pointers into
//                 the matrix equation (see the resistor instance class for
//                 more details).
//
// Special Notes :
// Creator       :
// Creation Date :
//-----------------------------------------------------------------------------
class Instance : public DeviceInstance
{
  friend class ParametricData<Instance>;
  friend class Model;
#ifdef Xyce_ADMS_SENSITIVITIES
  friend class InstanceSensitivity;
  friend class ModelSensitivity;
#endif // Xyce_ADMS_SENSITIVITIES
  friend struct Traits;

  public:
    Instance(
      const Configuration &       configuration,
      const InstanceBlock &       instance_block,
      Model &                     model,
      const FactoryBlock &        factory_block);

    ~Instance();

private:
    Instance(const Instance &);
    Instance &operator=(const Instance &);

public:
    void registerLIDs( const LocalIdVector & intLIDVecRef,
                       const LocalIdVector & extLIDVecRef );
    void registerStoreLIDs( const LocalIdVector & stoLIDVecRef );
    void setupPointers();

    void loadNodeSymbols(Util::SymbolTable &symbol_table) const;

    const JacobianStamp & jacobianStamp() const;
    void registerJacLIDs( const JacobianStamp & jacLIDVec );

    void registerBranchDataLIDs(const std::vector<int> & branchLIDVecRef);

    bool processParams();
    bool updateTemperature ( const double & temp = -999.0 );
    bool updateIntermediateVars ();
    bool updatePrimaryState ();
    bool updateSecondaryState ();

    // load functions, residual:
    bool loadDAEQVector ();
    bool loadDAEFVector ();

    // load functions, Jacobian:
    bool loadDAEdQdx ();
    bool loadDAEdFdx ();

      void collapseNodes();
      int getNumNoiseSources () const;  // 16
      void setupNoiseSources (Xyce::Analysis::NoiseData & noiseData);
      void getNoiseSources (Xyce::Analysis::NoiseData & noiseData);

  private:

  public:
    // iterator reference to the bsim6 model which owns this instance.
    // Getters and setters
    Model &getModel()
    {
      return model_;
    }

  private:

    Model & model_;   //< Owning Model
    // Begin verilog Instance Variables
    //   Instance Parameters
    double L;
    double W;
    int NF;
    double NRS;
    double NRD;
    double VFBSDOFF;
    int MINZ;
    double XGW;
    int NGCON;
    int RGATEMOD;
    int RBODYMOD;
    int GEOMOD;
    int RGEOMOD;
    double RBPB;
    double RBPD;
    double RBPS;
    double RBDB;
    double RBSB;
    double SA;
    double SB;
    double SD;
    int SCA;
    int SCB;
    int SCC;
    int SC;
    double AS;
    double AD;
    double PS;
    double PD;
    double m;
    //  Variables of global_instance scope
    double T0;
     double d_T0_dV_gm_di;
     double d_T0_dV_gm_si;
     double d_T0_dV_dbulk_di;
     double d_T0_dV_sbulk_si;
     double d_T0_dV_gi_bi;
     double d_T0_dV_di_bi;
     double d_T0_dV_si_bi;
     double d_T0_dTemp_t_GND;
    double T1;
     double d_T1_dV_gm_di;
     double d_T1_dV_gm_si;
     double d_T1_dV_dbulk_di;
     double d_T1_dV_sbulk_si;
     double d_T1_dV_gi_bi;
     double d_T1_dV_di_bi;
     double d_T1_dV_si_bi;
     double d_T1_dTemp_t_GND;
    double T2;
     double d_T2_dV_gm_di;
     double d_T2_dV_gm_si;
     double d_T2_dV_dbulk_di;
     double d_T2_dV_sbulk_si;
     double d_T2_dV_gi_bi;
     double d_T2_dV_di_bi;
     double d_T2_dV_si_bi;
     double d_T2_dTemp_t_GND;
    double epssi;
    double epsox;
    double Weff;
    double Leff;
    double Wact;
    double Lact;
    double Weffcj;
    double Cox;
    double epsratio;
    double Lnew;
    double L_mult;
    double Wnew;
    double DVTP0_i;
    double DVTP1_i;
    double DVTP2_i;
    double DVTP3_i;
    double DVTP4_i;
    double DVTP5_i;
    double A1_i;
    double A11_i;
    double A2_i;
    double A21_i;
    double PSAT_i;
    double PSATR_i;
    int devsign;
    double BSIM6TOXP;
    double DMCGeff;
    double DMDGeff;
    double DMCIeff;
    double RSourceGeo;
    double RDrainGeo;
    double Grgeltd;
    double Grbsb;
    double Grbdb;
    double Grbpb;
    double Grbps;
    double Grbpd;
    double Aechvb;
    double Bechvb;
    double AechvbEdge;
    double BechvbEdge;
    double ToxRatio;
    double U0R_t;
     double d_U0R_t_dTemp_t_GND;
    double UAR_t;
     double d_UAR_t_dTemp_t_GND;
    double UCR_t;
     double d_UCR_t_dTemp_t_GND;
    double UDR_t;
     double d_UDR_t_dTemp_t_GND;
    double UCSR_t;
     double d_UCSR_t_dTemp_t_GND;
    double VSATR_t;
     double d_VSATR_t_dTemp_t_GND;
    double PTWGR_t;
     double d_PTWGR_t_dTemp_t_GND;
    double ETA0R_t;
     double d_ETA0R_t_dTemp_t_GND;
    double PSATB_i;
    double KT1_i;
    double KT2_i;
    double NGATE_i;
    double NSD_i;
    double NDEP_i;
    double VFB_i;
    double CIT_i;
    double CDSCD_i;
    double CDSCDR_i;
    double CDSCB_i;
    double NFACTOR_i;
    double PHIN_i;
    double ETA0_i;
    double ETA0R_i;
    double ETAB_i;
    double K2_i;
     double d_K2_i_dTemp_t_GND;
    double K1_i;
    double DELTA_i;
    double U0_i;
    double U0R_i;
    double VSAT_i;
    double VSATR_i;
    double VSATCV_i;
    double UA_i;
    double UAR_i;
    double EU_i;
    double UD_i;
    double UDR_i;
    double UD_a;
     double d_UD_a_dTemp_t_GND;
     double d_UD_a_dV_di_bi;
     double d_UD_a_dV_si_bi;
    double UCS_i;
    double UCSR_i;
    double UC_i;
    double UCR_i;
    double PDIBLC_i;
    double PDIBLCR_i;
    double PDIBLCB_i;
    double PSCBE1_i;
    double PSCBE2_i;
    double PDITS_i;
    double PDITSD_i;
    double FPROUT_i;
    double PRWG_i;
    double WR_i;
    double RDWMIN_i;
    double RSWMIN_i;
    double RDW_i;
    double RSW_i;
    double RDSW_i;
    double RDSWMIN_i;
    double PTWG_i;
    double PTWGR_i;
    double PVAG_i;
    double XJ_i;
    double PCLM_i;
    double PCLMR_i;
    double PCLMCV_i;
    double PRWB_i;
    double CF_i;
    double CGSL_i;
    double CGDL_i;
    double CKAPPAS_i;
    double CKAPPAD_i;
    double VFBCV_i;
    double NDEPCV_i;
    double ALPHA0_i;
    double BETA0_i;
    double AGIDL_i;
    double BGIDL_i;
    double CGIDL_i;
    double EGIDL_i;
    double AGISL_i;
    double BGISL_i;
    double CGISL_i;
    double EGISL_i;
    double UTE_i;
    double UA1_i;
    double UC1_i;
    double UD1_i;
    double UCSTE_i;
    double PRT_i;
    double AT_i;
    double PTWGT_i;
    double IIT_i;
    double TGIDL_i;
    double KVTH0WE_i;
    double K2WE_i;
    double KU0WE_i;
    double AIGBINV_i;
    double BIGBINV_i;
    double CIGBINV_i;
    double EIGBINV_i;
    double NIGBINV_i;
    double AIGBACC_i;
    double BIGBACC_i;
    double CIGBACC_i;
    double NIGBACC_i;
    double AIGC_i;
    double BIGC_i;
    double CIGC_i;
    double AIGS_i;
    double BIGS_i;
    double CIGS_i;
    double AIGD_i;
    double BIGD_i;
    double CIGD_i;
    double PIGCD_i;
    double DLCIG_i;
    double DLCIGD_i;
    double IGT_i;
    double nuIntD;
    double nuEndD;
    double nuIntS;
    double nuEndS;
    double gth;
    double cth;
    double QBI;
     double d_QBI_dTemp_t_GND;
     double d_QBI_dV_dbulk_di;
     double d_QBI_dV_sbulk_si;
     double d_QBI_dV_gi_bi;
     double d_QBI_dV_di_bi;
     double d_QBI_dV_si_bi;
    double QSI;
     double d_QSI_dV_dbulk_di;
     double d_QSI_dV_sbulk_si;
     double d_QSI_dTemp_t_GND;
     double d_QSI_dV_gi_bi;
     double d_QSI_dV_di_bi;
     double d_QSI_dV_si_bi;
    double QDI;
     double d_QDI_dV_dbulk_di;
     double d_QDI_dV_sbulk_si;
     double d_QDI_dTemp_t_GND;
     double d_QDI_dV_gi_bi;
     double d_QDI_dV_di_bi;
     double d_QDI_dV_si_bi;
    double QGI;
     double d_QGI_dTemp_t_GND;
     double d_QGI_dV_dbulk_di;
     double d_QGI_dV_sbulk_si;
     double d_QGI_dV_gi_bi;
     double d_QGI_dV_di_bi;
     double d_QGI_dV_si_bi;
    double CGGI;
    double CGBI;
    double CGSI;
    double CGDI;
    double CSGI;
    double CSBI;
    double CSSI;
    double CSDI;
    double CDGI;
    double CDBI;
    double CDSI;
    double CDDI;
    double CBGI;
    double CBBI;
    double CBSI;
    double CBDI;
    double QB;
     double d_QB_dTemp_t_GND;
     double d_QB_dV_dbulk_di;
     double d_QB_dV_sbulk_si;
     double d_QB_dV_gi_bi;
     double d_QB_dV_di_bi;
     double d_QB_dV_si_bi;
     double d_QB_dV_gm_bi;
    double QS;
     double d_QS_dV_dbulk_di;
     double d_QS_dV_sbulk_si;
     double d_QS_dTemp_t_GND;
     double d_QS_dV_gi_bi;
     double d_QS_dV_di_bi;
     double d_QS_dV_si_bi;
     double d_QS_dV_gm_si;
    double QD;
     double d_QD_dV_dbulk_di;
     double d_QD_dV_sbulk_si;
     double d_QD_dTemp_t_GND;
     double d_QD_dV_gi_bi;
     double d_QD_dV_di_bi;
     double d_QD_dV_si_bi;
     double d_QD_dV_gm_si;
     double d_QD_dV_gm_di;
    double QG;
     double d_QG_dTemp_t_GND;
     double d_QG_dV_dbulk_di;
     double d_QG_dV_sbulk_si;
     double d_QG_dV_gi_bi;
     double d_QG_dV_di_bi;
     double d_QG_dV_si_bi;
     double d_QG_dV_gm_si;
     double d_QG_dV_gm_di;
     double d_QG_dV_gm_bi;
    double CGG;
    double CGB;
    double CGS;
    double CGD;
    double CSG;
    double CSB;
    double CSS;
    double CSD;
    double CDG;
    double CDB;
    double CDS;
    double CDD;
    double CBG;
    double CBB;
    double CBS;
    double CBD;
    double ISUB;
     double d_ISUB_dV_di_bi;
     double d_ISUB_dV_si_bi;
     double d_ISUB_dV_gi_bi;
     double d_ISUB_dTemp_t_GND;
    double IGIDL;
     double d_IGIDL_dV_gi_bi;
     double d_IGIDL_dV_di_bi;
     double d_IGIDL_dV_si_bi;
     double d_IGIDL_dTemp_t_GND;
    double IGISL;
     double d_IGISL_dV_gi_bi;
     double d_IGISL_dV_di_bi;
     double d_IGISL_dV_si_bi;
     double d_IGISL_dTemp_t_GND;
    double IGS;
     double d_IGS_dTemp_t_GND;
     double d_IGS_dV_gi_bi;
     double d_IGS_dV_si_bi;
     double d_IGS_dV_di_bi;
    double IGD;
     double d_IGD_dTemp_t_GND;
     double d_IGD_dV_gi_bi;
     double d_IGD_dV_di_bi;
     double d_IGD_dV_si_bi;
    double IGCS;
     double d_IGCS_dV_gi_bi;
     double d_IGCS_dV_di_bi;
     double d_IGCS_dV_si_bi;
     double d_IGCS_dTemp_t_GND;
    double IGCD;
     double d_IGCD_dV_gi_bi;
     double d_IGCD_dV_di_bi;
     double d_IGCD_dV_si_bi;
     double d_IGCD_dTemp_t_GND;
    double IGB;
     double d_IGB_dV_gi_bi;
     double d_IGB_dV_di_bi;
     double d_IGB_dV_si_bi;
     double d_IGB_dTemp_t_GND;
    double CGSEXT;
    double CGDEXT;
    double CGBOV;
    double CAPBS;
    double CAPBD;
    double WEFF;
    double LEFF;
    double WEFFCV;
    double LEFFCV;
    double IDS;
     double d_IDS_dV_gm_si;
     double d_IDS_dV_gm_di;
     double d_IDS_dV_dbulk_di;
     double d_IDS_dV_sbulk_si;
     double d_IDS_dV_gi_bi;
     double d_IDS_dTemp_t_GND;
     double d_IDS_dV_di_bi;
     double d_IDS_dV_si_bi;
    double IDEFF;
    double ISEFF;
    double IGEFF;
    double IBS;
    double IBD;
    double VDS;
    double VGS;
    double VBS;
    double VDSAT;
    double GM;
    double GMBS;
    double GDS;
    double TK;
    double VTH;
    // end verilog Instance Variables=====
    // Nodal LID Variables
    int li_d;
    int li_g;
    int li_s;
    int li_b;
    int li_t;
    int li_di;
    int li_si;
    int li_gi;
    int li_gm;
    int li_bi;
    int li_sbulk;
    int li_dbulk;
    int li_N1;
    int li_N2;
    // end Nodal LID Variables
    // Branch LID Variables
    // end Branch LID Variables
    // Lead (branch) LID Variables
    int li_branch_id;
    int li_branch_ig;
    int li_branch_is;
    int li_branch_ib;
    int li_branch_it;
    // end Lead (branch) LID Variables
    // Jacobian  pointers
    double * f_di_Equ_t_Node_Ptr;
    double * f_si_Equ_t_Node_Ptr;
    double * f_di_Equ_si_Node_Ptr;
    double * f_di_Equ_bi_Node_Ptr;
    double * f_si_Equ_si_Node_Ptr;
    double * f_si_Equ_bi_Node_Ptr;
    double * f_di_Equ_di_Node_Ptr;
    double * f_si_Equ_di_Node_Ptr;
    double * f_di_Equ_gi_Node_Ptr;
    double * f_si_Equ_gi_Node_Ptr;
    double * f_di_Equ_sbulk_Node_Ptr;
    double * f_si_Equ_sbulk_Node_Ptr;
    double * f_di_Equ_dbulk_Node_Ptr;
    double * f_si_Equ_dbulk_Node_Ptr;
    double * f_N2_Equ_sbulk_Node_Ptr;
    double * f_N2_Equ_si_Node_Ptr;
    double * f_N2_Equ_dbulk_Node_Ptr;
    double * f_N2_Equ_di_Node_Ptr;
    double * f_N2_Equ_t_Node_Ptr;
    double * f_N2_Equ_bi_Node_Ptr;
    double * f_N2_Equ_gi_Node_Ptr;
    double * f_N1_Equ_sbulk_Node_Ptr;
    double * f_N1_Equ_si_Node_Ptr;
    double * f_N1_Equ_dbulk_Node_Ptr;
    double * f_N1_Equ_di_Node_Ptr;
    double * f_N1_Equ_bi_Node_Ptr;
    double * f_N1_Equ_gi_Node_Ptr;
    double * f_N1_Equ_t_Node_Ptr;
    double * f_N1_Equ_N2_Node_Ptr;
    double * f_N1_Equ_N1_Node_Ptr;
    double * f_di_Equ_N2_Node_Ptr;
    double * f_si_Equ_N2_Node_Ptr;
    double * f_gi_Equ_N1_Node_Ptr;
    double * f_si_Equ_N1_Node_Ptr;
    double * f_gi_Equ_sbulk_Node_Ptr;
    double * f_gi_Equ_si_Node_Ptr;
    double * f_gi_Equ_dbulk_Node_Ptr;
    double * f_gi_Equ_di_Node_Ptr;
    double * f_gi_Equ_t_Node_Ptr;
    double * f_gi_Equ_bi_Node_Ptr;
    double * f_gi_Equ_gi_Node_Ptr;
    double * f_di_Equ_N1_Node_Ptr;
    double * f_N2_Equ_N2_Node_Ptr;
    double * f_bi_Equ_t_Node_Ptr;
    double * f_bi_Equ_si_Node_Ptr;
    double * f_bi_Equ_bi_Node_Ptr;
    double * f_bi_Equ_di_Node_Ptr;
    double * f_bi_Equ_gi_Node_Ptr;
    double * f_bi_Equ_sbulk_Node_Ptr;
    double * f_bi_Equ_dbulk_Node_Ptr;
    double * f_gm_Equ_gm_Node_Ptr;
    double * f_gm_Equ_si_Node_Ptr;
    double * f_si_Equ_gm_Node_Ptr;
    double * f_gm_Equ_bi_Node_Ptr;
    double * f_gm_Equ_di_Node_Ptr;
    double * f_gm_Equ_gi_Node_Ptr;
    double * f_gm_Equ_sbulk_Node_Ptr;
    double * f_gm_Equ_dbulk_Node_Ptr;
    double * f_gm_Equ_t_Node_Ptr;
    double * f_di_Equ_gm_Node_Ptr;
    double * f_bi_Equ_gm_Node_Ptr;
    double * f_d_Equ_si_Node_Ptr;
    double * f_d_Equ_bi_Node_Ptr;
    double * f_d_Equ_di_Node_Ptr;
    double * f_d_Equ_gi_Node_Ptr;
    double * f_d_Equ_t_Node_Ptr;
    double * f_d_Equ_d_Node_Ptr;
    double * f_di_Equ_d_Node_Ptr;
    double * f_s_Equ_si_Node_Ptr;
    double * f_s_Equ_bi_Node_Ptr;
    double * f_s_Equ_di_Node_Ptr;
    double * f_s_Equ_gi_Node_Ptr;
    double * f_s_Equ_t_Node_Ptr;
    double * f_s_Equ_s_Node_Ptr;
    double * f_si_Equ_s_Node_Ptr;
    double * f_g_Equ_t_Node_Ptr;
    double * f_g_Equ_si_Node_Ptr;
    double * f_g_Equ_bi_Node_Ptr;
    double * f_g_Equ_di_Node_Ptr;
    double * f_g_Equ_gi_Node_Ptr;
    double * f_g_Equ_g_Node_Ptr;
    double * f_g_Equ_gm_Node_Ptr;
    double * f_gm_Equ_g_Node_Ptr;
    double * f_gi_Equ_gm_Node_Ptr;
    double * f_t_Equ_s_Node_Ptr;
    double * f_t_Equ_si_Node_Ptr;
    double * f_t_Equ_d_Node_Ptr;
    double * f_t_Equ_di_Node_Ptr;
    double * f_t_Equ_bi_Node_Ptr;
    double * f_t_Equ_t_Node_Ptr;
    double * f_t_Equ_gi_Node_Ptr;
    double * f_t_Equ_sbulk_Node_Ptr;
    double * f_t_Equ_dbulk_Node_Ptr;
    double * f_t_Equ_gm_Node_Ptr;
    double * f_sbulk_Equ_bi_Node_Ptr;
    double * f_sbulk_Equ_sbulk_Node_Ptr;
    double * f_b_Equ_b_Node_Ptr;
    double * f_b_Equ_sbulk_Node_Ptr;
    double * f_sbulk_Equ_b_Node_Ptr;
    double * f_b_Equ_bi_Node_Ptr;
    double * f_bi_Equ_b_Node_Ptr;
    double * f_b_Equ_dbulk_Node_Ptr;
    double * f_dbulk_Equ_b_Node_Ptr;
    double * f_dbulk_Equ_dbulk_Node_Ptr;
    double * f_dbulk_Equ_bi_Node_Ptr;
    double * f_sbulk_Equ_t_Node_Ptr;
    double * f_b_Equ_t_Node_Ptr;
    double * f_dbulk_Equ_t_Node_Ptr;
    double * f_sbulk_Equ_si_Node_Ptr;
    double * f_sbulk_Equ_di_Node_Ptr;
    double * f_sbulk_Equ_gi_Node_Ptr;
    double * f_dbulk_Equ_si_Node_Ptr;
    double * f_dbulk_Equ_di_Node_Ptr;
    double * f_dbulk_Equ_gi_Node_Ptr;
    double * f_dbulk_Equ_sbulk_Node_Ptr;
    double * f_sbulk_Equ_dbulk_Node_Ptr;
    double * q_di_Equ_t_Node_Ptr;
    double * q_si_Equ_t_Node_Ptr;
    double * q_di_Equ_si_Node_Ptr;
    double * q_di_Equ_bi_Node_Ptr;
    double * q_si_Equ_si_Node_Ptr;
    double * q_si_Equ_bi_Node_Ptr;
    double * q_di_Equ_di_Node_Ptr;
    double * q_si_Equ_di_Node_Ptr;
    double * q_di_Equ_gi_Node_Ptr;
    double * q_si_Equ_gi_Node_Ptr;
    double * q_di_Equ_sbulk_Node_Ptr;
    double * q_si_Equ_sbulk_Node_Ptr;
    double * q_di_Equ_dbulk_Node_Ptr;
    double * q_si_Equ_dbulk_Node_Ptr;
    double * q_N2_Equ_sbulk_Node_Ptr;
    double * q_N2_Equ_si_Node_Ptr;
    double * q_N2_Equ_dbulk_Node_Ptr;
    double * q_N2_Equ_di_Node_Ptr;
    double * q_N2_Equ_t_Node_Ptr;
    double * q_N2_Equ_bi_Node_Ptr;
    double * q_N2_Equ_gi_Node_Ptr;
    double * q_N1_Equ_sbulk_Node_Ptr;
    double * q_N1_Equ_si_Node_Ptr;
    double * q_N1_Equ_dbulk_Node_Ptr;
    double * q_N1_Equ_di_Node_Ptr;
    double * q_N1_Equ_bi_Node_Ptr;
    double * q_N1_Equ_gi_Node_Ptr;
    double * q_N1_Equ_t_Node_Ptr;
    double * q_N1_Equ_N2_Node_Ptr;
    double * q_N1_Equ_N1_Node_Ptr;
    double * q_di_Equ_N2_Node_Ptr;
    double * q_si_Equ_N2_Node_Ptr;
    double * q_gi_Equ_N1_Node_Ptr;
    double * q_si_Equ_N1_Node_Ptr;
    double * q_gi_Equ_sbulk_Node_Ptr;
    double * q_gi_Equ_si_Node_Ptr;
    double * q_gi_Equ_dbulk_Node_Ptr;
    double * q_gi_Equ_di_Node_Ptr;
    double * q_gi_Equ_t_Node_Ptr;
    double * q_gi_Equ_bi_Node_Ptr;
    double * q_gi_Equ_gi_Node_Ptr;
    double * q_di_Equ_N1_Node_Ptr;
    double * q_N2_Equ_N2_Node_Ptr;
    double * q_bi_Equ_t_Node_Ptr;
    double * q_bi_Equ_si_Node_Ptr;
    double * q_bi_Equ_bi_Node_Ptr;
    double * q_bi_Equ_di_Node_Ptr;
    double * q_bi_Equ_gi_Node_Ptr;
    double * q_bi_Equ_sbulk_Node_Ptr;
    double * q_bi_Equ_dbulk_Node_Ptr;
    double * q_gm_Equ_gm_Node_Ptr;
    double * q_gm_Equ_si_Node_Ptr;
    double * q_si_Equ_gm_Node_Ptr;
    double * q_gm_Equ_bi_Node_Ptr;
    double * q_gm_Equ_di_Node_Ptr;
    double * q_gm_Equ_gi_Node_Ptr;
    double * q_gm_Equ_sbulk_Node_Ptr;
    double * q_gm_Equ_dbulk_Node_Ptr;
    double * q_gm_Equ_t_Node_Ptr;
    double * q_di_Equ_gm_Node_Ptr;
    double * q_bi_Equ_gm_Node_Ptr;
    double * q_d_Equ_si_Node_Ptr;
    double * q_d_Equ_bi_Node_Ptr;
    double * q_d_Equ_di_Node_Ptr;
    double * q_d_Equ_gi_Node_Ptr;
    double * q_d_Equ_t_Node_Ptr;
    double * q_d_Equ_d_Node_Ptr;
    double * q_di_Equ_d_Node_Ptr;
    double * q_s_Equ_si_Node_Ptr;
    double * q_s_Equ_bi_Node_Ptr;
    double * q_s_Equ_di_Node_Ptr;
    double * q_s_Equ_gi_Node_Ptr;
    double * q_s_Equ_t_Node_Ptr;
    double * q_s_Equ_s_Node_Ptr;
    double * q_si_Equ_s_Node_Ptr;
    double * q_g_Equ_t_Node_Ptr;
    double * q_g_Equ_si_Node_Ptr;
    double * q_g_Equ_bi_Node_Ptr;
    double * q_g_Equ_di_Node_Ptr;
    double * q_g_Equ_gi_Node_Ptr;
    double * q_g_Equ_g_Node_Ptr;
    double * q_g_Equ_gm_Node_Ptr;
    double * q_gm_Equ_g_Node_Ptr;
    double * q_gi_Equ_gm_Node_Ptr;
    double * q_t_Equ_s_Node_Ptr;
    double * q_t_Equ_si_Node_Ptr;
    double * q_t_Equ_d_Node_Ptr;
    double * q_t_Equ_di_Node_Ptr;
    double * q_t_Equ_bi_Node_Ptr;
    double * q_t_Equ_t_Node_Ptr;
    double * q_t_Equ_gi_Node_Ptr;
    double * q_t_Equ_sbulk_Node_Ptr;
    double * q_t_Equ_dbulk_Node_Ptr;
    double * q_t_Equ_gm_Node_Ptr;
    double * q_sbulk_Equ_bi_Node_Ptr;
    double * q_sbulk_Equ_sbulk_Node_Ptr;
    double * q_b_Equ_b_Node_Ptr;
    double * q_b_Equ_sbulk_Node_Ptr;
    double * q_sbulk_Equ_b_Node_Ptr;
    double * q_b_Equ_bi_Node_Ptr;
    double * q_bi_Equ_b_Node_Ptr;
    double * q_b_Equ_dbulk_Node_Ptr;
    double * q_dbulk_Equ_b_Node_Ptr;
    double * q_dbulk_Equ_dbulk_Node_Ptr;
    double * q_dbulk_Equ_bi_Node_Ptr;
    double * q_sbulk_Equ_t_Node_Ptr;
    double * q_b_Equ_t_Node_Ptr;
    double * q_dbulk_Equ_t_Node_Ptr;
    double * q_sbulk_Equ_si_Node_Ptr;
    double * q_sbulk_Equ_di_Node_Ptr;
    double * q_sbulk_Equ_gi_Node_Ptr;
    double * q_dbulk_Equ_si_Node_Ptr;
    double * q_dbulk_Equ_di_Node_Ptr;
    double * q_dbulk_Equ_gi_Node_Ptr;
    double * q_dbulk_Equ_sbulk_Node_Ptr;
    double * q_sbulk_Equ_dbulk_Node_Ptr;
    // Jacobian offsets
    int A_di_Equ_t_NodeOffset;
    int A_si_Equ_t_NodeOffset;
    int A_di_Equ_si_NodeOffset;
    int A_di_Equ_bi_NodeOffset;
    int A_si_Equ_si_NodeOffset;
    int A_si_Equ_bi_NodeOffset;
    int A_di_Equ_di_NodeOffset;
    int A_si_Equ_di_NodeOffset;
    int A_di_Equ_gi_NodeOffset;
    int A_si_Equ_gi_NodeOffset;
    int A_di_Equ_sbulk_NodeOffset;
    int A_si_Equ_sbulk_NodeOffset;
    int A_di_Equ_dbulk_NodeOffset;
    int A_si_Equ_dbulk_NodeOffset;
    int A_N2_Equ_sbulk_NodeOffset;
    int A_N2_Equ_si_NodeOffset;
    int A_N2_Equ_dbulk_NodeOffset;
    int A_N2_Equ_di_NodeOffset;
    int A_N2_Equ_t_NodeOffset;
    int A_N2_Equ_bi_NodeOffset;
    int A_N2_Equ_gi_NodeOffset;
    int A_N1_Equ_sbulk_NodeOffset;
    int A_N1_Equ_si_NodeOffset;
    int A_N1_Equ_dbulk_NodeOffset;
    int A_N1_Equ_di_NodeOffset;
    int A_N1_Equ_bi_NodeOffset;
    int A_N1_Equ_gi_NodeOffset;
    int A_N1_Equ_t_NodeOffset;
    int A_N1_Equ_N2_NodeOffset;
    int A_N1_Equ_N1_NodeOffset;
    int A_di_Equ_N2_NodeOffset;
    int A_si_Equ_N2_NodeOffset;
    int A_gi_Equ_N1_NodeOffset;
    int A_si_Equ_N1_NodeOffset;
    int A_gi_Equ_sbulk_NodeOffset;
    int A_gi_Equ_si_NodeOffset;
    int A_gi_Equ_dbulk_NodeOffset;
    int A_gi_Equ_di_NodeOffset;
    int A_gi_Equ_t_NodeOffset;
    int A_gi_Equ_bi_NodeOffset;
    int A_gi_Equ_gi_NodeOffset;
    int A_di_Equ_N1_NodeOffset;
    int A_N2_Equ_N2_NodeOffset;
    int A_bi_Equ_t_NodeOffset;
    int A_bi_Equ_si_NodeOffset;
    int A_bi_Equ_bi_NodeOffset;
    int A_bi_Equ_di_NodeOffset;
    int A_bi_Equ_gi_NodeOffset;
    int A_bi_Equ_sbulk_NodeOffset;
    int A_bi_Equ_dbulk_NodeOffset;
    int A_gm_Equ_gm_NodeOffset;
    int A_gm_Equ_si_NodeOffset;
    int A_si_Equ_gm_NodeOffset;
    int A_gm_Equ_bi_NodeOffset;
    int A_gm_Equ_di_NodeOffset;
    int A_gm_Equ_gi_NodeOffset;
    int A_gm_Equ_sbulk_NodeOffset;
    int A_gm_Equ_dbulk_NodeOffset;
    int A_gm_Equ_t_NodeOffset;
    int A_di_Equ_gm_NodeOffset;
    int A_bi_Equ_gm_NodeOffset;
    int A_d_Equ_si_NodeOffset;
    int A_d_Equ_bi_NodeOffset;
    int A_d_Equ_di_NodeOffset;
    int A_d_Equ_gi_NodeOffset;
    int A_d_Equ_t_NodeOffset;
    int A_d_Equ_d_NodeOffset;
    int A_di_Equ_d_NodeOffset;
    int A_s_Equ_si_NodeOffset;
    int A_s_Equ_bi_NodeOffset;
    int A_s_Equ_di_NodeOffset;
    int A_s_Equ_gi_NodeOffset;
    int A_s_Equ_t_NodeOffset;
    int A_s_Equ_s_NodeOffset;
    int A_si_Equ_s_NodeOffset;
    int A_g_Equ_t_NodeOffset;
    int A_g_Equ_si_NodeOffset;
    int A_g_Equ_bi_NodeOffset;
    int A_g_Equ_di_NodeOffset;
    int A_g_Equ_gi_NodeOffset;
    int A_g_Equ_g_NodeOffset;
    int A_g_Equ_gm_NodeOffset;
    int A_gm_Equ_g_NodeOffset;
    int A_gi_Equ_gm_NodeOffset;
    int A_t_Equ_s_NodeOffset;
    int A_t_Equ_si_NodeOffset;
    int A_t_Equ_d_NodeOffset;
    int A_t_Equ_di_NodeOffset;
    int A_t_Equ_bi_NodeOffset;
    int A_t_Equ_t_NodeOffset;
    int A_t_Equ_gi_NodeOffset;
    int A_t_Equ_sbulk_NodeOffset;
    int A_t_Equ_dbulk_NodeOffset;
    int A_t_Equ_gm_NodeOffset;
    int A_sbulk_Equ_bi_NodeOffset;
    int A_sbulk_Equ_sbulk_NodeOffset;
    int A_b_Equ_b_NodeOffset;
    int A_b_Equ_sbulk_NodeOffset;
    int A_sbulk_Equ_b_NodeOffset;
    int A_b_Equ_bi_NodeOffset;
    int A_bi_Equ_b_NodeOffset;
    int A_b_Equ_dbulk_NodeOffset;
    int A_dbulk_Equ_b_NodeOffset;
    int A_dbulk_Equ_dbulk_NodeOffset;
    int A_dbulk_Equ_bi_NodeOffset;
    int A_sbulk_Equ_t_NodeOffset;
    int A_b_Equ_t_NodeOffset;
    int A_dbulk_Equ_t_NodeOffset;
    int A_sbulk_Equ_si_NodeOffset;
    int A_sbulk_Equ_di_NodeOffset;
    int A_sbulk_Equ_gi_NodeOffset;
    int A_dbulk_Equ_si_NodeOffset;
    int A_dbulk_Equ_di_NodeOffset;
    int A_dbulk_Equ_gi_NodeOffset;
    int A_dbulk_Equ_sbulk_NodeOffset;
    int A_sbulk_Equ_dbulk_NodeOffset;
    // end of Jacobian and pointers
   // node numbers
    static const int admsNodeID_d = 0;
    static const int admsNodeID_g = 1;
    static const int admsNodeID_s = 2;
    static const int admsNodeID_b = 3;
// optional node t:
    static const int admsNodeID_t = 4;
    static const int admsNodeID_di = 0+5;
    static const int admsNodeID_si = 1+5;
    static const int admsNodeID_gi = 2+5;
    static const int admsNodeID_gm = 3+5;
    static const int admsNodeID_bi = 4+5;
    static const int admsNodeID_sbulk = 5+5;
    static const int admsNodeID_dbulk = 6+5;
    static const int admsNodeID_N1 = 7+5;
    static const int admsNodeID_N2 = 8+5;
    static const int admsNodeID_GND = -1;
   // end node numbers
   // Additional IDs for branch equations
   // end branch numbers
   // Probe numbers
    static const int admsProbeID_V_bi_dbulk = 0;
    static const int admsProbeID_V_b_dbulk = 1;
    static const int admsProbeID_V_b_bi = 2;
    static const int admsProbeID_V_b_sbulk = 3;
    static const int admsProbeID_V_bi_sbulk = 4;
    static const int admsProbeID_V_gm_gi = 5;
    static const int admsProbeID_V_g_gm = 6;
    static const int admsProbeID_V_s_si = 7;
    static const int admsProbeID_V_d_di = 8;
    static const int admsProbeID_V_gi_si = 9;
    static const int admsProbeID_V_di_si = 10;
    static const int admsProbeID_V_dbulk_GND = 11;
    static const int admsProbeID_V_sbulk_GND = 12;
    static const int admsProbeID_V_gm_GND = 13;
    static const int admsProbeID_V_gi_GND = 14;
    static const int admsProbeID_V_bi_GND = 15;
    static const int admsProbeID_V_di_GND = 16;
    static const int admsProbeID_V_si_GND = 17;
    static const int admsProbeID_V_gm_bi = 18;
    static const int admsProbeID_V_N1_GND = 19;
    static const int admsProbeID_V_N2_GND = 20;
    static const int admsProbeID_V_gm_si = 21;
    static const int admsProbeID_V_gm_di = 22;
    static const int admsProbeID_V_dbulk_di = 23;
    static const int admsProbeID_V_sbulk_si = 24;
    static const int admsProbeID_V_si_bi = 25;
    static const int admsProbeID_V_di_bi = 26;
    static const int admsProbeID_V_gi_bi = 27;
    static const int admsProbeID_Temp_t_GND = 28;
   // end probe numbers
   // Store LIDs
   // end store LIDs
   // Store LIDs for output vars
    int li_store_QBI;
    int li_store_QSI;
    int li_store_QDI;
    int li_store_QGI;
    int li_store_CGGI;
    int li_store_CGBI;
    int li_store_CGSI;
    int li_store_CGDI;
    int li_store_CSGI;
    int li_store_CSBI;
    int li_store_CSSI;
    int li_store_CSDI;
    int li_store_CDGI;
    int li_store_CDBI;
    int li_store_CDSI;
    int li_store_CDDI;
    int li_store_CBGI;
    int li_store_CBBI;
    int li_store_CBSI;
    int li_store_CBDI;
    int li_store_QB;
    int li_store_QS;
    int li_store_QD;
    int li_store_QG;
    int li_store_CGG;
    int li_store_CGB;
    int li_store_CGS;
    int li_store_CGD;
    int li_store_CSG;
    int li_store_CSB;
    int li_store_CSS;
    int li_store_CSD;
    int li_store_CDG;
    int li_store_CDB;
    int li_store_CDS;
    int li_store_CDD;
    int li_store_CBG;
    int li_store_CBB;
    int li_store_CBS;
    int li_store_CBD;
    int li_store_ISUB;
    int li_store_IGIDL;
    int li_store_IGISL;
    int li_store_IGS;
    int li_store_IGD;
    int li_store_IGCS;
    int li_store_IGCD;
    int li_store_IGB;
    int li_store_CGSEXT;
    int li_store_CGDEXT;
    int li_store_CGBOV;
    int li_store_CAPBS;
    int li_store_CAPBD;
    int li_store_WEFF;
    int li_store_LEFF;
    int li_store_WEFFCV;
    int li_store_LEFFCV;
    int li_store_IDS;
    int li_store_IDEFF;
    int li_store_ISEFF;
    int li_store_IGEFF;
    int li_store_IBS;
    int li_store_IBD;
    int li_store_VDS;
    int li_store_VGS;
    int li_store_VBS;
    int li_store_VDSAT;
    int li_store_GM;
    int li_store_GMBS;
    int li_store_GDS;
    int li_store_TK;
    int li_store_VTH;
   // end store LIDs for output vars
     // bools for collapsing nodes
     bool collapseNode_t;
     bool collapseNode_di;
     bool collapseNode_si;
     bool collapseNode_gi;
     bool collapseNode_gm;
     bool collapseNode_bi;
     bool collapseNode_sbulk;
     bool collapseNode_dbulk;
 // Arrays to hold probes
 std::vector < double > probeVars;
 std::vector < std::vector < double > > d_probeVars;
 // Arrays to hold contributions
 // dynamic contributions are differentiated w.r.t time
 std::vector < double > staticContributions;
 std::vector < std::vector < double > > d_staticContributions;
 std::vector < double > dynamicContributions;
 std::vector < std::vector < double > > d_dynamicContributions;
//vectors to hold noise information for communication between methods
std::vector<double> noiseContribsPower;
std::vector<double> noiseContribsExponent;


    // this is what we'll use when any model uses $temperature.  We'll
    // set it in updateTemperature, and initialize it to whatever
    // is in devOptions when the instance is constructed.
    double admsTemperature;

    // vt at $temperature;
    double adms_vt_nom;


    // This one is for the annoying bogus "XyceADMSInstTemp" parameter
    // that we need so we can set it from the device manager when there's no
    // "TEMP" parameter to use
    double admsInstTemp;


    JacobianStamp jacStamp;
    IdVector nodeMap;
    PairMap pairToJacStampMap;

    // These instance-owned vectors are for storage of lead current data
    std::vector<double> leadCurrentF;
    std::vector<double> leadCurrentQ;

      std::vector<bool> portsConnected_;

    };



namespace AnalogFunctions
{

      // Analog Function lexp
double lexp(double x);
// Derivative of Analog Function lexp
double d_lexp(double x  , double d_x  );
// Evaluator class for Analog Function lexp
class lexpEvaluator
{
  struct returnType
  {
     double value;
     double deriv_WRT_x;
  };
public:
  // constructor takes all same arguments as regular templated function,
  // even though it doesn't USE the output args
  lexpEvaluator(double x);
  // function that returns the precomputed values.  This, too, takes
  // all the same arguments as the regular function, though it ONLY
  // uses the output arguments
  double getValues(double  x);
  // function that returns the total derivative of the function and its
  // output arguments with respect to some variable.  We pass in the
  // normal arguments(none of which are used) and the derivatives of those
  // arguments with respect to the desired variable.  We compute the
  // derivatives using the chain rule and our precomputed derivatives
  // with respect to input variables
double getDerivs(double x  , double d_x);
private:
  returnType lexpReturn_;
  returnType evaluator_(double x);
};


      // Analog Function lln
double lln(double x);
// Derivative of Analog Function lln
double d_lln(double x  , double d_x  );
// Evaluator class for Analog Function lln
class llnEvaluator
{
  struct returnType
  {
     double value;
     double deriv_WRT_x;
  };
public:
  // constructor takes all same arguments as regular templated function,
  // even though it doesn't USE the output args
  llnEvaluator(double x);
  // function that returns the precomputed values.  This, too, takes
  // all the same arguments as the regular function, though it ONLY
  // uses the output arguments
  double getValues(double  x);
  // function that returns the total derivative of the function and its
  // output arguments with respect to some variable.  We pass in the
  // normal arguments(none of which are used) and the derivatives of those
  // arguments with respect to the desired variable.  We compute the
  // derivatives using the chain rule and our precomputed derivatives
  // with respect to input variables
double getDerivs(double x  , double d_x);
private:
  returnType llnReturn_;
  returnType evaluator_(double x);
};


      // Analog Function hypsmooth
double hypsmooth(double x, double c);
// Derivative of Analog Function hypsmooth
double d_hypsmooth(double x , double c  , double d_x  , double d_c  );
// Evaluator class for Analog Function hypsmooth
class hypsmoothEvaluator
{
  struct returnType
  {
     double value;
     double deriv_WRT_x;
     double deriv_WRT_c;
  };
public:
  // constructor takes all same arguments as regular templated function,
  // even though it doesn't USE the output args
  hypsmoothEvaluator(double x, double c);
  // function that returns the precomputed values.  This, too, takes
  // all the same arguments as the regular function, though it ONLY
  // uses the output arguments
  double getValues(double  x, double  c);
  // function that returns the total derivative of the function and its
  // output arguments with respect to some variable.  We pass in the
  // normal arguments(none of which are used) and the derivatives of those
  // arguments with respect to the desired variable.  We compute the
  // derivatives using the chain rule and our precomputed derivatives
  // with respect to input variables
double getDerivs(double x , double c  , double d_x, double d_c);
private:
  returnType hypsmoothReturn_;
  returnType evaluator_(double x, double c);
};

}


//-----------------------------------------------------------------------------
// Class         : Model

// Purpose       :
// Special Notes :
// Creator       :
// Creation Date :
//-----------------------------------------------------------------------------
class Model : public DeviceModel
{
    typedef std::vector<Instance *> InstanceVector;

    friend class ParametricData<Model>;
    friend class Instance;
#ifdef Xyce_ADMS_SENSITIVITIES
    friend class InstanceSensitivity;
    friend class ModelSensitivity;
#endif // Xyce_ADMS_SENSITIVITIES
    friend struct Traits;

  public:
    Model(
      const Configuration &       configuration,
      const ModelBlock &          model_block,
      const FactoryBlock &        factory_block);

    ~Model();

private:
    Model(const Model &);
    Model &operator=(const Model &);

public:
    virtual void forEachInstance(DeviceInstanceOp &op) const /* override */;
    virtual std::ostream &printOutInstances(std::ostream &os) const;
    bool processParams();
    bool processInstanceParams();

  private:

  public:
    void addInstance(Instance *instance)
    {
      instanceContainer.push_back(instance);
    }

    void setupBaseInstanceContainer()
    {
      std::vector<Instance*>::iterator iter = instanceContainer.begin();
      std::vector<Instance*>::iterator end   = instanceContainer.end();
      for ( ; iter!=end; ++iter)
      {
      Xyce::Device::DeviceModel::baseInstanceContainer.push_back( static_cast<Xyce::Device::DeviceInstance *>(*iter) );
    }
  }

  private:
    std::vector<Instance*> instanceContainer;

  private:

    // This one is for the annoying bogus "XyceADMSInstTemp" parameter
    // that we need so we can set it from the device manager when there's no
    // "TEMP" model parameter to use
    double admsModTemp;
// Begin verilog Model Variables
//   Model Parameters
    double L;
    double VFBSDOFF;
    double XGW;
    int NGCON;
    int RGATEMOD;
    int RBODYMOD;
    int GEOMOD;
    int RGEOMOD;
    double RBPB;
    double RBPD;
    double RBPS;
    double RBDB;
    double RBSB;
    double SA;
    double SB;
    double SD;
    int SCA;
    int SCB;
    int SCC;
    int SC;
    int TYPE;
    int CVMOD;
    int COVMOD;
    int RDSMOD;
    int WPEMOD;
    int ASYMMOD;
    int GIDLMOD;
    int IGCMOD;
    int IGBMOD;
    int TNOIMOD;
    int SHMOD;
    int MOBSCALE;
    double LLONG;
    double LMLT;
    double WMLT;
    double XL;
    double WWIDE;
    double XW;
    double LINT;
    double LL;
    double LW;
    double LWL;
    double LLN;
    double LWN;
    double WINT;
    double WL;
    double WW;
    double WWL;
    double WLN;
    double WWN;
    double DLC;
    double LLC;
    double LWC;
    double LWLC;
    double DWC;
    double WLC;
    double WWC;
    double WWLC;
    double TOXE;
    double TOXP;
    double DTOX;
    double NDEP;
    double NDEPL1;
    double NDEPLEXP1;
    double NDEPL2;
    double NDEPLEXP2;
    double NDEPW;
    double NDEPWEXP;
    double NDEPWL;
    double NDEPWLEXP;
    double LNDEP;
    double WNDEP;
    double PNDEP;
    double NDEPCV;
    double NDEPCVL1;
    double NDEPCVLEXP1;
    double NDEPCVL2;
    double NDEPCVLEXP2;
    double NDEPCVW;
    double NDEPCVWEXP;
    double NDEPCVWL;
    double NDEPCVWLEXP;
    double LNDEPCV;
    double WNDEPCV;
    double PNDEPCV;
    double NGATE;
    double LNGATE;
    double WNGATE;
    double PNGATE;
    double EASUB;
    double NI0SUB;
    double BG0SUB;
    double EPSRSUB;
    double EPSROX;
    double XJ;
    double LXJ;
    double WXJ;
    double PXJ;
    double LVFB;
    double WVFB;
    double PVFB;
    double VFB;
    double VFBCV;
    double LVFBCV;
    double WVFBCV;
    double PVFBCV;
    double VFBCVL;
    double VFBCVLEXP;
    double VFBCVW;
    double VFBCVWEXP;
    double VFBCVWL;
    double VFBCVWLEXP;
    int PERMOD;
    double DWJ;
    double NSD;
    double LNSD;
    double WNSD;
    double PNSD;
    double DELVT0;
    double DVTP0;
    double LDVTP0;
    double WDVTP0;
    double PDVTP0;
    double DVTP1;
    double LDVTP1;
    double WDVTP1;
    double PDVTP1;
    double DVTP2;
    double LDVTP2;
    double WDVTP2;
    double PDVTP2;
    double DVTP3;
    double LDVTP3;
    double WDVTP3;
    double PDVTP3;
    double DVTP4;
    double LDVTP4;
    double WDVTP4;
    double PDVTP4;
    double DVTP5;
    double LDVTP5;
    double WDVTP5;
    double PDVTP5;
    double PHIN;
    double LPHIN;
    double WPHIN;
    double PPHIN;
    double ETA0;
    double LETA0;
    double WETA0;
    double PETA0;
    double ETA0R;
    double LETA0R;
    double WETA0R;
    double PETA0R;
    double DSUB;
    double ETAB;
    double ETABEXP;
    double LETAB;
    double WETAB;
    double PETAB;
    double K1;
    double K1L;
    double K1LEXP;
    double K1W;
    double K1WEXP;
    double K1WL;
    double K1WLEXP;
    double LK1;
    double WK1;
    double PK1;
    double K2;
    double K2L;
    double K2LEXP;
    double K2W;
    double K2WEXP;
    double K2WL;
    double K2WLEXP;
    double LK2;
    double WK2;
    double PK2;
    double ADOS;
    double BDOS;
    double QM0;
    double ETAQM;
    double CIT;
    double LCIT;
    double WCIT;
    double PCIT;
    double NFACTOR;
    double NFACTORL;
    double NFACTORLEXP;
    double NFACTORW;
    double NFACTORWEXP;
    double NFACTORWL;
    double NFACTORWLEXP;
    double LNFACTOR;
    double WNFACTOR;
    double PNFACTOR;
    double CDSCD;
    double CDSCDL;
    double CDSCDLEXP;
    double LCDSCD;
    double WCDSCD;
    double PCDSCD;
    double CDSCDR;
    double CDSCDLR;
    double LCDSCDR;
    double WCDSCDR;
    double PCDSCDR;
    double CDSCB;
    double CDSCBL;
    double CDSCBLEXP;
    double LCDSCB;
    double WCDSCB;
    double PCDSCB;
    double VSAT;
    double LVSAT;
    double WVSAT;
    double PVSAT;
    double VSATL;
    double VSATLEXP;
    double VSATW;
    double VSATWEXP;
    double VSATWL;
    double VSATWLEXP;
    double VSATR;
    double LVSATR;
    double WVSATR;
    double PVSATR;
    double DELTA;
    double LDELTA;
    double WDELTA;
    double PDELTA;
    double DELTAL;
    double DELTALEXP;
    double VSATCV;
    double LVSATCV;
    double WVSATCV;
    double PVSATCV;
    double VSATCVL;
    double VSATCVLEXP;
    double VSATCVW;
    double VSATCVWEXP;
    double VSATCVWL;
    double VSATCVWLEXP;
    double UP1;
    double LP1;
    double UP2;
    double LP2;
    double MULU0;
    double U0;
    double U0L;
    double U0LEXP;
    double LU0;
    double WU0;
    double PU0;
    double U0R;
    double LU0R;
    double WU0R;
    double PU0R;
    double ETAMOB;
    double UA;
    double UAL;
    double UALEXP;
    double UAW;
    double UAWEXP;
    double UAWL;
    double UAWLEXP;
    double LUA;
    double WUA;
    double PUA;
    double UAR;
    double LUAR;
    double WUAR;
    double PUAR;
    double EU;
    double LEU;
    double WEU;
    double PEU;
    double EUL;
    double EULEXP;
    double EUW;
    double EUWEXP;
    double EUWL;
    double EUWLEXP;
    double UD;
    double UDL;
    double UDLEXP;
    double LUD;
    double WUD;
    double PUD;
    double UDR;
    double LUDR;
    double WUDR;
    double PUDR;
    double UCS;
    double LUCS;
    double WUCS;
    double PUCS;
    double UCSR;
    double LUCSR;
    double WUCSR;
    double PUCSR;
    double UC;
    double UCL;
    double UCLEXP;
    double UCW;
    double UCWEXP;
    double UCWL;
    double UCWLEXP;
    double LUC;
    double WUC;
    double PUC;
    double UCR;
    double LUCR;
    double WUCR;
    double PUCR;
    double PCLM;
    double PCLML;
    double PCLMLEXP;
    double LPCLM;
    double WPCLM;
    double PPCLM;
    double PCLMR;
    double LPCLMR;
    double WPCLMR;
    double PPCLMR;
    double PCLMG;
    double PCLMCV;
    double PCLMCVL;
    double PCLMCVLEXP;
    double LPCLMCV;
    double WPCLMCV;
    double PPCLMCV;
    double PSCBE1;
    double LPSCBE1;
    double WPSCBE1;
    double PPSCBE1;
    double PSCBE2;
    double LPSCBE2;
    double WPSCBE2;
    double PPSCBE2;
    double PDITS;
    double LPDITS;
    double WPDITS;
    double PPDITS;
    double PDITSL;
    double PDITSD;
    double LPDITSD;
    double WPDITSD;
    double PPDITSD;
    double RSH;
    double PRWG;
    double LPRWG;
    double WPRWG;
    double PPRWG;
    double PRWB;
    double LPRWB;
    double WPRWB;
    double PPRWB;
    double PRWBL;
    double PRWBLEXP;
    double WR;
    double LWR;
    double WWR;
    double PWR;
    double RSWMIN;
    double LRSWMIN;
    double WRSWMIN;
    double PRSWMIN;
    double RSW;
    double LRSW;
    double WRSW;
    double PRSW;
    double RSWL;
    double RSWLEXP;
    double RDWMIN;
    double LRDWMIN;
    double WRDWMIN;
    double PRDWMIN;
    double RDW;
    double LRDW;
    double WRDW;
    double PRDW;
    double RDWL;
    double RDWLEXP;
    double RDSWMIN;
    double LRDSWMIN;
    double WRDSWMIN;
    double PRDSWMIN;
    double RDSW;
    double RDSWL;
    double RDSWLEXP;
    double LRDSW;
    double WRDSW;
    double PRDSW;
    double PSAT;
    double LPSAT;
    double WPSAT;
    double PPSAT;
    double PSATL;
    double PSATLEXP;
    double PSATB;
    double PSATR;
    double LPSATR;
    double WPSATR;
    double PPSATR;
    double LPSATB;
    double WPSATB;
    double PPSATB;
    double PSATX;
    double PTWG;
    double LPTWG;
    double WPTWG;
    double PPTWG;
    double PTWGL;
    double PTWGLEXP;
    double PTWGR;
    double LPTWGR;
    double WPTWGR;
    double PPTWGR;
    double PTWGLR;
    double PTWGLEXPR;
    double A1;
    double LA1;
    double WA1;
    double PA1;
    double A11;
    double LA11;
    double WA11;
    double PA11;
    double A2;
    double LA2;
    double WA2;
    double PA2;
    double A21;
    double LA21;
    double WA21;
    double PA21;
    double PDIBLC;
    double PDIBLCL;
    double PDIBLCLEXP;
    double LPDIBLC;
    double WPDIBLC;
    double PPDIBLC;
    double PDIBLCR;
    double PDIBLCLR;
    double PDIBLCLEXPR;
    double LPDIBLCR;
    double WPDIBLCR;
    double PPDIBLCR;
    double PDIBLCB;
    double LPDIBLCB;
    double WPDIBLCB;
    double PPDIBLCB;
    double PVAG;
    double LPVAG;
    double WPVAG;
    double PPVAG;
    double FPROUT;
    double FPROUTL;
    double FPROUTLEXP;
    double LFPROUT;
    double WFPROUT;
    double PFPROUT;
    double ALPHA0;
    double ALPHA0L;
    double ALPHA0LEXP;
    double LALPHA0;
    double WALPHA0;
    double PALPHA0;
    double BETA0;
    double LBETA0;
    double WBETA0;
    double PBETA0;
    double AIGBACC;
    double BIGBACC;
    double CIGBACC;
    double NIGBACC;
    double AIGBINV;
    double BIGBINV;
    double CIGBINV;
    double EIGBINV;
    double NIGBINV;
    double AIGC;
    double BIGC;
    double CIGC;
    double AIGS;
    double BIGS;
    double CIGS;
    double AIGD;
    double BIGD;
    double CIGD;
    double DLCIG;
    double DLCIGD;
    double POXEDGE;
    double NTOX;
    double TOXREF;
    double PIGCD;
    double AIGCL;
    double AIGCW;
    double AIGSL;
    double AIGSW;
    double AIGDL;
    double AIGDW;
    double PIGCDL;
    double LAIGBINV;
    double WAIGBINV;
    double PAIGBINV;
    double LBIGBINV;
    double WBIGBINV;
    double PBIGBINV;
    double LCIGBINV;
    double WCIGBINV;
    double PCIGBINV;
    double LEIGBINV;
    double WEIGBINV;
    double PEIGBINV;
    double LNIGBINV;
    double WNIGBINV;
    double PNIGBINV;
    double LAIGBACC;
    double WAIGBACC;
    double PAIGBACC;
    double LBIGBACC;
    double WBIGBACC;
    double PBIGBACC;
    double LCIGBACC;
    double WCIGBACC;
    double PCIGBACC;
    double LNIGBACC;
    double WNIGBACC;
    double PNIGBACC;
    double LAIGC;
    double WAIGC;
    double PAIGC;
    double LBIGC;
    double WBIGC;
    double PBIGC;
    double LCIGC;
    double WCIGC;
    double PCIGC;
    double LAIGS;
    double WAIGS;
    double PAIGS;
    double LBIGS;
    double WBIGS;
    double PBIGS;
    double LCIGS;
    double WCIGS;
    double PCIGS;
    double LAIGD;
    double WAIGD;
    double PAIGD;
    double LBIGD;
    double WBIGD;
    double PBIGD;
    double LCIGD;
    double WCIGD;
    double PCIGD;
    double LPOXEDGE;
    double WPOXEDGE;
    double PPOXEDGE;
    double LDLCIG;
    double WDLCIG;
    double PDLCIG;
    double LDLCIGD;
    double WDLCIGD;
    double PDLCIGD;
    double LNTOX;
    double WNTOX;
    double PNTOX;
    double AGIDL;
    double AGIDLL;
    double AGIDLW;
    double LAGIDL;
    double WAGIDL;
    double PAGIDL;
    double BGIDL;
    double LBGIDL;
    double WBGIDL;
    double PBGIDL;
    double CGIDL;
    double LCGIDL;
    double WCGIDL;
    double PCGIDL;
    double EGIDL;
    double LEGIDL;
    double WEGIDL;
    double PEGIDL;
    double AGISL;
    double AGISLL;
    double AGISLW;
    double LAGISL;
    double WAGISL;
    double PAGISL;
    double BGISL;
    double LBGISL;
    double WBGISL;
    double PBGISL;
    double CGISL;
    double LCGISL;
    double WCGISL;
    double PCGISL;
    double EGISL;
    double LEGISL;
    double WEGISL;
    double PEGISL;
    double CF;
    double LCF;
    double WCF;
    double PCF;
    double CFRCOEFF;
    double CGSO;
    double CGDO;
    double CGBO;
    double CGSL;
    double LCGSL;
    double WCGSL;
    double PCGSL;
    double CGDL;
    double LCGDL;
    double WCGDL;
    double PCGDL;
    double CKAPPAS;
    double LCKAPPAS;
    double WCKAPPAS;
    double PCKAPPAS;
    double CKAPPAD;
    double LCKAPPAD;
    double WCKAPPAD;
    double PCKAPPAD;
    double DMCG;
    double DMCI;
    double DMDG;
    double DMCGT;
    double XGL;
    double RSHG;
    double CJS;
    double CJD;
    double CJSWS;
    double CJSWD;
    double CJSWGS;
    double CJSWGD;
    double PBS;
    double PBD;
    double PBSWS;
    double PBSWD;
    double PBSWGS;
    double PBSWGD;
    double MJS;
    double MJD;
    double MJSWS;
    double MJSWD;
    double MJSWGS;
    double MJSWGD;
    double JSS;
    double JSD;
    double JSWS;
    double JSWD;
    double JSWGS;
    double JSWGD;
    double NJS;
    double NJD;
    double IJTHSFWD;
    double IJTHDFWD;
    double IJTHSREV;
    double IJTHDREV;
    double BVS;
    double BVD;
    double XJBVS;
    double XJBVD;
    double JTSS;
    double JTSD;
    double JTSSWS;
    double JTSSWD;
    double JTSSWGS;
    double JTSSWGD;
    double JTWEFF;
    double NJTS;
    double NJTSD;
    double NJTSSW;
    double NJTSSWD;
    double NJTSSWG;
    double NJTSSWGD;
    double VTSS;
    double VTSD;
    double VTSSWS;
    double VTSSWD;
    double VTSSWGS;
    double VTSSWGD;
    double XRCRG1;
    double XRCRG2;
    double GBMIN;
    double RBPS0;
    double RBPSL;
    double RBPSW;
    double RBPSNF;
    double RBPD0;
    double RBPDL;
    double RBPDW;
    double RBPDNF;
    double RBPBX0;
    double RBPBXL;
    double RBPBXW;
    double RBPBXNF;
    double RBPBY0;
    double RBPBYL;
    double RBPBYW;
    double RBPBYNF;
    double RBSBX0;
    double RBSBY0;
    double RBDBX0;
    double RBDBY0;
    double RBSDBXL;
    double RBSDBXW;
    double RBSDBXNF;
    double RBSDBYL;
    double RBSDBYW;
    double RBSDBYNF;
    double EF;
    double EM;
    double NOIA;
    double NOIB;
    double NOIC;
    double LINTNOI;
    double NTNOI;
    double RNOIA;
    double RNOIB;
    double RNOIC;
    double TNOIA;
    double TNOIB;
    double TNOIC;
    int BINUNIT;
    double DLBIN;
    double DWBIN;
    double TNOM;
    double DTEMP;
    double TBGASUB;
    double TBGBSUB;
    double TNFACTOR;
    double UTE;
    double LUTE;
    double WUTE;
    double PUTE;
    double UTEL;
    double UA1;
    double LUA1;
    double WUA1;
    double PUA1;
    double UA1L;
    double UC1;
    double LUC1;
    double WUC1;
    double PUC1;
    double UD1;
    double LUD1;
    double WUD1;
    double PUD1;
    double UD1L;
    double UCSTE;
    double LUCSTE;
    double WUCSTE;
    double PUCSTE;
    double TETA0;
    double PRT;
    double LPRT;
    double WPRT;
    double PPRT;
    double AT;
    double LAT;
    double WAT;
    double PAT;
    double ATL;
    double TDELTA;
    double PTWGT;
    double LPTWGT;
    double WPTWGT;
    double PPTWGT;
    double PTWGTL;
    double KT1;
    double KT1EXP;
    double KT1L;
    double LKT1;
    double WKT1;
    double PKT1;
    double KT2;
    double LKT2;
    double WKT2;
    double PKT2;
    double IIT;
    double LIIT;
    double WIIT;
    double PIIT;
    double IGT;
    double LIGT;
    double WIGT;
    double PIGT;
    double TGIDL;
    double LTGIDL;
    double WTGIDL;
    double PTGIDL;
    double TCJ;
    double TCJSW;
    double TCJSWG;
    double TPB;
    double TPBSW;
    double TPBSWG;
    double XTIS;
    double XTID;
    double XTSS;
    double XTSD;
    double XTSSWS;
    double XTSSWD;
    double XTSSWGS;
    double XTSSWGD;
    double TNJTS;
    double TNJTSD;
    double TNJTSSW;
    double TNJTSSWD;
    double TNJTSSWG;
    double TNJTSSWGD;
    double RTH0;
    double CTH0;
    double WTH0;
    double SAREF;
    double SBREF;
    double WLOD;
    double KU0;
    double KVSAT;
    double TKU0;
    double LKU0;
    double WKU0;
    double PKU0;
    double LLODKU0;
    double WLODKU0;
    double KVTH0;
    double LKVTH0;
    double WKVTH0;
    double PKVTH0;
    double LLODVTH;
    double WLODVTH;
    double STK2;
    double LODK2;
    double STETA0;
    double LODETA0;
    double WEB;
    double WEC;
    double KVTH0WE;
    double LKVTH0WE;
    double WKVTH0WE;
    double PKVTH0WE;
    double K2WE;
    double LK2WE;
    double WK2WE;
    double PK2WE;
    double KU0WE;
    double LKU0WE;
    double WKU0WE;
    double PKU0WE;
    double SCREF;
    int EDGEFET;
    double WEDGE;
    double DGAMMAEDGE;
    double DGAMMAEDGEL;
    double DGAMMAEDGELEXP;
    double DVTEDGE;
    double NFACTOREDGE;
    double CITEDGE;
    double CDSCDEDGE;
    double CDSCBEDGE;
    double ETA0EDGE;
    double ETABEDGE;
    double KT1EDGE;
    double KT1LEDGE;
    double KT2EDGE;
    double KT1EXPEDGE;
    double TNFACTOREDGE;
    double TETA0EDGE;
    double DVT0EDGE;
    double DVT1EDGE;
    double DVT2EDGE;
    double LMIN;
    double WMIN;
    double LMAX;
    double WMAX;
    //  Variables of global_model scope
    // end verilog model variables=====
};

void registerDevice(const DeviceCountMap& deviceMap = DeviceCountMap(),
                    const std::set<int>& levelSet = std::set<int>());

} // namespace ADMSbsim6
} // namespace Device
} // namespace Xyce
#endif //Xyce_N_DEV_ADMSbsim6_h
